SERIALIZABLE
- SQL course
- Advanced
- Lesson 58/81
- 4 min
Learn the highest level.
SERIALIZABLE
SERIALIZABLE is the highest level. Transactions run as if sequential. All issues are prevented.
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;Safest but slowest.
SERIALIZABLE — details
SERIALIZABLE also prevents phantom reads. But locking reduces performance.
Transactions behave as if they ran one after another; on a conflict the database aborts one with an error and the application must retry it.
Practice SERIALIZABLE
Set the isolation level to SERIALIZABLE.
Starter code
-- highest level
SETSample solution
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;Expected output
İzolasyon ayarlandı
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 SERIALIZABLE
SET TRANSACTION ISOLATION LEVEL ____
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
Explanation: SERIALIZABLE is the right answer.
2 SERIALIZABLE: match the terms
| Term | Meaning |
|---|---|
SERIALIZABLE |
highest |
phantom |
prevented |
sequential |
safe |
slow |
locking |
3 Which is the safest isolation?
- SERIALIZABLE Correct answer
- READ UNCOMMITTED
- READ COMMITTED
- REPEATABLE READ
Explanation: SERIALIZABLE is the safest.