Section: Insert, Update, Delete, and Merge

Delete rows

sql
sql
DELETE FROM sessions WHERE expires_at < now();
Explanation

See summary for usage details.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Insert, Update, Delete, and Merge
Insert row
Insert one row into a table.
OpenIn sheetsqlsame section
Update rows
Modify matching rows.
OpenIn sheetsqlsame section
Delete with RETURNING
Delete rows and return what was removed.
OpenIn sheetsqlsame section
Merge source data
Synchronize target data from a source relation with a single statement.
OpenIn sheetsqlsame section
Insert multiple rows
Insert many rows in one statement.
OpenIn sheetsqlsame section
Insert with RETURNING
Insert rows and immediately return generated values.
OpenIn sheetsqlsame section