Standard

SQL UPDATE/DELETE Statement Generator

Build a safe UPDATE or DELETE statement, always with a WHERE clause front and centre.

Advertisement

About this tool

Choose UPDATE or DELETE, name the table and add a WHERE condition. For UPDATE, add each column and its new value: text is quoted and escaped for you, plain numbers, true, false and NULL are left as they are, and starting a value with = inserts it as raw SQL, so =NOW() or =price * 1.1 work as expressions rather than text.

The tool warns you when the WHERE box is empty, because running UPDATE or DELETE without one changes or removes every row in the table. A good habit is to run the same WHERE as a SELECT COUNT(*) first, to check how many rows it will affect.