postgresql_16:7.1.98.5 Examples
PostgreSQL 16 > Reference > SQL Commands > DELETE > Examples
Delete all films but musicals: DELETE FROM films WHERE kind <> 'Musical';
Clear the table films: DELETE FROM films;
Delete completed tasks, returning full details of the deleted rows: DELETE FROM tasks WHERE status = 'DONE' RETURNING *;
Delete the row of tasks on which the cursor c_tasks is currently positioned: DELETE FROM tasks WHERE CURRENT OF c_tasks;