thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Lost Update

An anomaly in which two transactions read the same value and both write back, so one overwrites the other's change.

Definition

Lost updates arise in read-modify-write patterns without proper locking. Prevent them with SELECT ... FOR UPDATE, version or rowversion checks (optimistic concurrency), or atomic updates such as SET qty = qty - 1.

Example

Two clerks each read stock = 10, each sell one, and both write 9.

Exam tip

Atomic UPDATE ... SET x = x - 1 avoids lost updates without explicit locking.

Related terms