Delete#
Syntax#
DELETE FROM table_name
WHERE predicate [AND predicate ...];
Rules#
WHEREis required. ADELETEwithout aWHEREclause is rejected by the parser.Predicates are combined with
ANDonly and must be equality predicates covering the complete primary key (one equality per primary-key column); non-key predicates and range predicates are not supported.
Examples#
Delete a specific row:
DELETE FROM new_order
WHERE no_w_id = 1 AND no_d_id = 2 AND no_o_id = 100;
Delete with a placeholder:
DELETE FROM history
WHERE h_id = ?;