Example (standard-style syntax). Verify supported keywords in your database.
DELETE FROM sessions WHERE expires_at < CURRENT_TIMESTAMP;Remove matching rows from a table.
DELETE FROM table_name WHERE condition;Example (standard-style syntax). Verify supported keywords in your database.
DELETE FROM sessions WHERE expires_at < CURRENT_TIMESTAMP;SQLite-oriented variant; dialect behaviour may differ.
DELETE FROM sessions WHERE expires_at < CURRENT_TIMESTAMP;| Option / clause | Description |
|---|---|
WHERE | Limit rows being removed; omitting it may delete every row. |
USING / JOIN | Match rows through another table where supported. |
RETURNING / OUTPUT | Return deleted rows where supported. |
LIMIT | Limit affected rows where supported. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.