我不知道我的查询有什么问题,但是我收到了这个错误:
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From a
INNER JOIN table2 b
ON a.column1 = b.column1 AND a.column2 = b.column2' at line 4
Run Code Online (Sandbox Code Playgroud)
这是我正在尝试的sql:
UPDATE table1 AS a
Set a.Closed = 2
From a
INNER JOIN table2 b
ON a.column1 = b.column1 AND a.column2 = b.column2
WHERE number in (01809076,02170039);
Run Code Online (Sandbox Code Playgroud)
在MySQL,UPDATEwith join 的语法是这样的.(没有FROM条款)
UPDATE table1 AS a
INNER JOIN table2 b
ON a.column1 = b.column1 AND
a.column2 = b.column2
SET a.Closed = 2
WHERE b.number in (01809076,02170039);
Run Code Online (Sandbox Code Playgroud)
你目前正在使用的是 T-SQL
| 归档时间: |
|
| 查看次数: |
158 次 |
| 最近记录: |