SQL

DELETE

DestructiveDelete rows

DELETE FROM <table> WHERE ...;

Deletes rows matching a condition; a missing WHERE wipes the table.

Examples

  • DELETE FROM sessions WHERE expired=1;Delete expired rows

Syntax

DELETE FROM <table> WHERE <cond>;

Before you run it

Without WHERE it deletes everything; check with SELECT first.

Related commands

Check it once more before you run it

Some commands cannot be undone if one flag is wrong. An on-device reference works with no connection. Free to install, no ads.

Get it free on the App Store