Delete Statement
SQL statement that removes one or more rows from a table.
See Delete statement
Teradata support calling more than one table in theFROM
clause, Snowflake does not. Therefore, it is necessary to use theUSING
clause to refer to the extra tables involved in the condition.
Teradata
DEL FROM MY_TABLE ALL;
DEL FROM MY_TABLE_2 WHERE COL1 > 50;
DELETE T1 FROM TABLE1 T1, TABLE2 T2 WHERE T1.ID = T2.ID;
DELETE FROM TABLE1 T1, TABLE2 T2 WHERE T1.ID = T2.ID;
DELETE T1 FROM TABLE2 T2, TABLE1 T1 WHERE T1.ID = T2.ID;
DELETE FROM TABLE1 WHERE TABLE1.COLUMN1 = TABLE2.COLUMN2
Snowflake
DELETE FROM PUBLIC.MY_TABLE ;
DELETE FROM PUBLIC.MY_TABLE_2 WHERE COL1 > 50;
DELETE FROM PUBLIC.TABLE1 T1 USING PUBLIC.TABLE2 T2 WHERE T1.ID = T2.ID;
DELETE FROM PUBLIC.TABLE1 T1 USING PUBLIC.TABLE2 T2 WHERE T1.ID = T2.ID;
DELETE FROM PUBLIC.TABLE1 T1 USING PUBLIC.TABLE2 T2 WHERE T1.ID = T2.ID;
DELETE FROM PUBLIC.TABLE1 WHERE TABLE1.COLUMN1 = TABLE2.COLUMN2;
Known Issues
1. DEL abbreviation unsupported
The abbreviation is unsupported in Snowflake but it is translated correctly by changing it to DELETE.
Related EWIs
No related EWIs.
Last updated
Was this helpful?