Problem Description

When processing an order, lock it so two workers do not process it together. Write a safe SELECT FOR UPDATE pattern.

Input Format

SQL script

Output Format

Statements

Sample Test Case

Input:
Orders(order_id, status)
Output:
Locked row

Constraints

Use status check

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next