-
Notifications
You must be signed in to change notification settings - Fork 405
DELETE FROM
Rene Saarsoo edited this page Jul 17, 2022
·
4 revisions
SQL standard specifies the following DELETE syntax:
DELETE FROM { table_name | ONLY "(" table_name ")" } [[AS] alias]
[WHERE condition | WHERE CURRENT OF cursor_name]
This base syntax is pretty well supported (except in Spark):
DELETE [FROM] table_name [alias]
WHERE condition
DB2:
DELETE FROM { table_name | ONLY "(" table_name ")" | "(" fullselect ")" }
[[AS] correlation_clause]
[INCLUDE include_columns]
[assignment_clause]
[WHERE condition | WHERE CURRENT OF cursor_name]
[WITH {RR | RS | CS | UR}]
Hive:
DELETE FROM table_name
[WHERE condition]
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM table_name
[PARTITION "(" partition_list ")"]
[FOR PORTION OF period FROM expr1 TO expr2]
[FROM from_clause]
[USING using_clause]
[WHERE condition]
[ORDER BY ...]
[LIMIT row_count]
[RETURNING returning_clause]
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM table_name [[AS] alias]
[PARTITION "(" partition_list ")"]
[WHERE condition]
[ORDER BY ...]
[LIMIT row_count]
N1QL:
DELETE FROM table_name
[USE [PRIMARY] KEYS expr]
[WHERE condition]
[LIMIT expr]
[RETURNING returning_clause]
DELETE [hint] FROM { table_name | ONLY "(" table_name ")" } [alias]
[WHERE condition]
[[RETURN | RETURNING] returning_clause]
[LOG ERRORS error_logging_clause]
[WITH [RECURSIVE] with_clause]
DELETE FROM [ONLY] table_name [ * ] [[AS] alias]
[USING from_items]
[WHERE condition | WHERE CURRENT OF cursor_name]
[RETURNING returning_clause]
[WITH [RECURSIVE] with_clause]
DELETE [FROM] table_name
[USING from_items]
[WHERE condition]
No support for DELETE
[WITH [RECURSIVE] with_clause]
DELETE FROM table_name
[FROM from_clause]
[WHERE condition]
[RETURNING returning_clause]
[WITH with_clause]
DELETE [TOP ( expression ) [PERCENT]] FROM table_name
[FROM from_clause]
[WHERE condition | WHERE CURRENT OF [GLOBAL] cursor_name]
[OPTION query_hints]
DELETE FROM table_name [WHERE condition]