-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdelete.txt
46 lines (39 loc) · 1.13 KB
/
delete.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
================================================================================
DELETE statement
================================================================================
DELETE FROM foo;
DELETE FROM foo WHERE name = 'bar';
--------------------------------------------------------------------------------
(source_file
(delete_statement
(from_clause
(identifier)))
(delete_statement
(from_clause
(identifier))
(where_clause
(binary_expression
(identifier)
(string
(content))))))
================================================================================
DELETE with CTE
================================================================================
WITH t AS (
SELECT * FROM foo
)
DELETE FROM bar;
--------------------------------------------------------------------------------
(source_file
(delete_statement
(with_clause
(cte
(identifier)
(select_statement
(select_clause
(select_clause_body
(asterisk_expression)))
(from_clause
(identifier)))))
(from_clause
(identifier))))