提交 47f75a43 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix UPDATE clause in MERGE USING grammar

上级 5a56b541
...@@ -61,9 +61,7 @@ INSERT INTO TEST VALUES(1, 'Hello') ...@@ -61,9 +61,7 @@ INSERT INTO TEST VALUES(1, 'Hello')
" "
"Commands (DML)","UPDATE"," "Commands (DML)","UPDATE","
UPDATE tableName [ [ AS ] newTableAlias ] SET UPDATE tableName [ [ AS ] newTableAlias ] SET setClauseList
{ { columnName = { DEFAULT | expression } } [,...] } |
{ ( columnName [,...] ) = ( select ) }
[ WHERE expression ] [ ORDER BY order [,...] ] [ LIMIT expression ] [ WHERE expression ] [ ORDER BY order [,...] ] [ LIMIT expression ]
"," ","
Updates data in a table. Updates data in a table.
...@@ -129,7 +127,8 @@ MERGE INTO TEST KEY(ID) VALUES(2, 'World') ...@@ -129,7 +127,8 @@ MERGE INTO TEST KEY(ID) VALUES(2, 'World')
MERGE INTO targetTableName [ [AS] targetAlias] MERGE INTO targetTableName [ [AS] targetAlias]
USING { ( select ) | sourceTableName }[ [AS] sourceAlias ] USING { ( select ) | sourceTableName }[ [AS] sourceAlias ]
ON ( expression ) ON ( expression )
[ WHEN MATCHED THEN [ update ] [ delete] ] [ WHEN MATCHED THEN
[ UPDATE SET setClauseList ] [ delete ] ]
[ WHEN NOT MATCHED THEN insert ] [ WHEN NOT MATCHED THEN insert ]
"," ","
Updates or deletes existing rows, and insert rows that don't exist. The ON clause Updates or deletes existing rows, and insert rows that don't exist. The ON clause
...@@ -2438,6 +2437,15 @@ An expression in a SELECT statement. ...@@ -2438,6 +2437,15 @@ An expression in a SELECT statement.
ID AS VALUE ID AS VALUE
" "
"Other Grammar","Set clause list","
{ { columnName = { DEFAULT | expression } } [,...] } |
{ ( columnName [,...] ) = ( select ) }
","
List of SET clauses.
","
NAME = 'Test', VALUE = 2
"
"Other Grammar","String"," "Other Grammar","String","
'anythingExceptSingleQuote' 'anythingExceptSingleQuote'
"," ","
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论