MySQL 的1093错误

1093错误为:但修改一个表的时候子查询不能是同一个表,解决办法:把子查询再套一层就可以了,例如:


update mt_device set area_id=null WHERE reg_code in(select c.reg_code from (select reg_code from mt_device where area_id=19)c);  这是对的
但是 update mt_device set area_id=null WHERE reg_code in (select reg_code from mt_device where area_id=19);就会报1093错误。

发布了406 篇原创文章 · 获赞 127 · 访问量 81万+

猜你喜欢

转载自blog.csdn.net/Dongguabai/article/details/101279223
今日推荐