top of page
CerebroSQL

PostgreSQL:  

DELETE

DELETE FROM [ ONLY ] table [ * ] [ [ AS ] alias ]
[ USING using_list ]
[ WHERE condition | WHERE CURRENT OF cursor_name ]
[ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]

Example

DELETE FROM films WHERE kind <> 'Musical';
DELETE FROM tasks WHERE status = 'DONE' RETURNING *;
DELETE FROM tasks WHERE CURRENT OF c_tasks;

bottom of page