Remove records by condition.
Section: Insert, update, delete, and upsert
Delete matching rows
sql
sql
DELETE FROM sessions WHERE expires_at < CURRENT_TIMESTAMP;Explanation
A common cleanup pattern for caches, sessions, and temporary records.
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 upsert