Detect and prevent phantom reads (concept + SQL)

SQL Medium 4 views
Back to Questions

Problem Description

Write a transaction that counts active orders, then inserts a new active order. Mention isolation needed in description and show SERIALIZABLE statement.

Input Format

SQL script

Output Format

Statements

Sample Test Case

Input:
Orders(status)
Output:
Serializable transaction

Constraints

Use SERIALIZABLE to prevent phantoms

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next