原文:MYSQL错误代码: 1093 You can't specify target table 'sc' for update in FROM clause

MYSQL执行如下语句报错: UPDATE sc SET grade grade . WHERE grade lt SELECT AVG grade AS avg grade FROM sc 报错信息如下: 错误代码: You can t specify target table sc for update in FROM clause 意思是不能在同一语句中更新select出的同一张表元组的属性 ...

2016-07-28 19:04 0 11961 推荐指数:

查看详情

You can't specify target table 'xxx' for update in FROM clause

1、执行sql语句报上面的错误: 报错如下所示You can't specify target table 'xxx' for update in FROM clause。 原因:因为在MYSQL里,不能先select一个表的记录,在按此条件进行更新和删除同一个表的记录。 详细 ...

Sun May 12 17:52:00 CST 2019 0 1188
You can't specify target table 'a' for update in FROM clause

项目中有一个功能变动上线,其中有一张表ttt的字段cc,历史数据需要处理,把字段cc中为’xxx’的值替换为'yyy'。 表A结构如下: 更新sql如下: 执行报错: Duplicate ...

Thu Feb 21 23:20:00 CST 2019 0 1887
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM