您的位置:首页 > 数据库 > MySQL

mysql 删除和修改的时候,where 条件中使用原table报错的问题

2011-08-28 10:00 543 查看
updae table a set level =2 where super_code in (select code from table where level=1)

报错You can't specify target table 'A' for update in FROM clause

修改为

updae table a set level =2 where super_code in (select code from (select * from table) b where level=1)

即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐