What is isolation?
- SQL course
- Advanced
- Lesson 54/81
- 4 min
Learn how transactions see each other.
What is isolation?
Isolation controls how concurrent transactions affect each other. Four levels exist.
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;Mid-level isolation.
What is isolation? — details
Low level is fast but risky, high level is safe but slow. Choosing the right balance is key.
Most databases default to READ COMMITTED; for critical operations such as money transfers a higher level is chosen deliberately.
Practice What is isolation?
Set the isolation level to READ COMMITTED.
Starter code
-- set isolation
SETSample solution
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;Expected output
İzolasyon ayarlandı
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 How many isolation levels exist?
- Four Correct answer
- Two
- Three
- Five
Explanation: Four isolation levels exist.
2 Add SET TRANSACTION
____ ISOLATION LEVEL READ COMMITTED;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
Explanation: SET TRANSACTION is the right answer.
3 What is isolation: match the terms
| Term | Meaning |
|---|---|
READ UNCOMMITTED |
lowest |
READ COMMITTED |
mid |
REPEATABLE READ |
high |
SERIALIZABLE |
highest |