Gnoseed
Programming · Flashcard

An UPDATE runs with no WHERE clause. What happens?

Why this is the answer

A missing WHERE means every row matches, and the server does it without comment — which is why this is the classic production incident and why clients such as psql offer no protection. Wrapping the statement in a transaction and checking the row count before COMMIT is the habit that saves you.

Read more in the docs
Study in Gnoseed →