Programming · Flashcard

What does an UPDATE without a WHERE clause do?

  • AUpdates every row in the table — the assignment applies to all rows unconditionally
  • BUpdates no rows at all — the engine refuses to run without a filtering condition
  • CUpdates the first row only — the statement stops after one successful change
  • DRaises a syntax error — WHERE is a mandatory clause of the UPDATE statement

Why this is the answer

WHERE is optional — omit it and every row gets the new values, a classic production accident (some clients offer safe modes exactly because of this). The engine doesn't refuse, doesn't stop at one row, and the statement is perfectly valid syntax.

Official docs
Study in Gnoseed →