update与left join结合问题

MySql 码拜 7年前 (2017-05-09) 5089次浏览
update c set s="3" 
from ccc as c 
left join aaa a 
on c.cid=a.eid 
where a.type="01" and c.s="1" and (c.p=2807 or a.op=2807)

讨教一下,这个sql语句怎么会报错呢?
[Err] 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 ccc as c
left join aaa as a
on c.cid=a.eid
where a.t” at line 2
请不吝赐教!

解决方案

10

关注!本人也碰到相似问题!update与left join结合问题

58

update ccc,aaa set ccc.s=”3″
where  c.cid=a.eid  and a.type=”01″ and c.s=”1″ and (c.p=2807 or a.op=2807)

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明update与left join结合问题
喜欢 (2)
[1034331897@qq.com]
分享 (0)