0
0
SQLquery~10 mins

Transaction isolation levels in SQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the transaction isolation level to READ COMMITTED.

SQL
SET TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREAD UNCOMMITTED
BSERIALIZABLE
CREPEATABLE READ
DREAD COMMITTED
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing READ UNCOMMITTED causes dirty reads.
Choosing SERIALIZABLE is stricter than needed here.
2fill in blank
medium

Complete the code to start a transaction with the SERIALIZABLE isolation level.

SQL
START TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
ASERIALIZABLE
BREAD COMMITTED
CREPEATABLE READ
DREAD UNCOMMITTED
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing REPEATABLE READ does not prevent phantom reads.
Choosing READ COMMITTED allows some concurrency anomalies.
3fill in blank
hard

Fix the error in the code to set the isolation level to REPEATABLE READ.

SQL
SET TRANSACTION ISOLATION [1] REPEATABLE READ;
Drag options to blanks, or click blank then click option'
ATO
BMODE
CLEVEL
DWITH
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'MODE' instead of 'LEVEL' causes syntax errors.
Omitting the keyword after ISOLATION is invalid.
4fill in blank
hard

Fill the three blanks to complete the command that sets the isolation level to READ UNCOMMITTED for the current session.

SQL
SET SESSION TRANSACTION ISOLATION [1] [2] [3];
Drag options to blanks, or click blank then click option'
ALEVEL
BREAD
CUNCOMMITTED
DMODE
Attempts:
3 left
💡 Hint
Common Mistakes
Using MODE instead of LEVEL causes errors.
Missing the isolation level name after LEVEL.
5fill in blank
hard

Fill all three blanks to write a query that shows the current transaction isolation level.

SQL
SELECT @@transaction_isolation AS [1], @@[2] AS [3];
Drag options to blanks, or click blank then click option'
Acurrent_level
Btx_isolation
Csession_level
Disolation_level
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect variable names causes errors.
Not aliasing columns makes output less clear.