Skip to content
SQLSimplified
BackendQuestion 36 of 52

Pessimistic Locking Example

Problem

Write a query to select the employee with employee_id = 1 and lock the row for update (if the dialect supports it). Use FOR UPDATE. Note: DuckDB WASM ignores this, but it is standard SQL.

Try It

Loading playground environment...

Hint

Solution