提交 9daa8ba8 authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 572: MySQL compatibility for "order by" in update statements.

上级 5dafb69a
...@@ -59,7 +59,7 @@ INSERT INTO TEST VALUES(1, 'Hello') ...@@ -59,7 +59,7 @@ INSERT INTO TEST VALUES(1, 'Hello')
UPDATE tableName [ [ AS ] newTableAlias ] SET UPDATE tableName [ [ AS ] newTableAlias ] SET
{ { columnName = { DEFAULT | expression } } [,...] } | { { columnName = { DEFAULT | expression } } [,...] } |
{ ( columnName [,...] ) = ( select ) } { ( columnName [,...] ) = ( select ) }
[ WHERE expression ] [ LIMIT expression ] [ ORDER BY order [,...] ] [ WHERE expression ] [ ORDER BY order [,...] ] [ LIMIT expression ]
"," ","
Updates data in a table. Updates data in a table.
ORDER BY is supported for MySQL compatibility, but it is ignored. ORDER BY is supported for MySQL compatibility, but it is ignored.
......
...@@ -799,7 +799,7 @@ select count(*) from test; ...@@ -799,7 +799,7 @@ select count(*) from test;
> 3; > 3;
select max(col1) from test; select max(col1) from test;
> 3; > 3;
update test set col1 = col1 + 1 limit 1 order by col1 asc; update test set col1 = col1 + 1 order by col1 asc limit 100;
select count(*) from test; select count(*) from test;
> 3; > 3;
select max(col1) from test; select max(col1) from test;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论