postgresql delete from table code example
Example 1: delete entries in postgresql
DELETE FROM table WHERE condition;
Example 2: postegresql delete
DELETE FROM films
WHERE producer_id IN (SELECT id FROM producers WHERE name = 'foo');
Example 3: delete entries in postgresql
DELETE FROM table
USING another_table
WHERE table.id = another_table.id;
Example 4: psql delete table
DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]