在MySQL中,写SQL语句的时候 ,可能会遇到You can't specify target table '表名' for update in FROM clause这样的错误,它的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中),即不能依据某字段值做判断 ...
这篇文章主要介绍了mysql中You can t specify target table for update in FROM clause错误解决方法,需要的朋友可以参考下 MySQL中You can t specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表 在同一语句中 。 例 ...
2017-06-15 11:21 0 38635 推荐指数:
在MySQL中,写SQL语句的时候 ,可能会遇到You can't specify target table '表名' for update in FROM clause这样的错误,它的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中),即不能依据某字段值做判断 ...
背景 在MySQL中,写SQL语句的时候 ,可能会遇到 You can't specify target table '表名' for update in FROM clause 这样的错误 错误含义 它的意思是说,不能先 select 出同一表中的某些值,再 update 这个表(在同一 ...
You can't specify target table '表名' for update in FROM clause 翻译为:不能先select出同一表中的某些值,再update这个表(在同一语句中) 实例: 表:result 表student 表:grade ...
update语句中包含的子查询的表和update的表为同一张表时,报错:1093-You can’t specify target table for update in FROM clause mysql不允许update目标表和子查询里面的表为同一张表 错误sql:UPDATE ...
1、执行sql语句报上面的错误: 报错如下所示You can't specify target table 'xxx' for update in FROM clause。 原因:因为在MYSQL里,不能先select一个表的记录,在按此条件进行更新和删除同一个表的记录。 详细 ...
项目中有一个功能变动上线,其中有一张表ttt的字段cc,历史数据需要处理,把字段cc中为’xxx’的值替换为'yyy'。 表A结构如下: 更新sql如下: 执行报错: Duplicate ...
有一个表示地区的表,表结构与数据大概如下表。 ID NAME PARENT_ID 1 中国 ...
MYSQL执行如下语句报错: UPDATE sc SET grade =grade*1.05 WHERE grade < (SELECT AVG(grade) AS avg_grade FROM sc) 报错信息如下: 错误代码: 1093 You can't specify ...