update test set i_status=5 where s_id in ( select max(s_id) as id from test where s_title is not null group by s_title,length(s_content) having count(*)>1 ) 执行报错,提示 : Error Code: 1093. You can't specify target table 'car' for update in FROM clause。本篇博文主要是针...
Error Code: 1093. You can't specify target table 'ws_product' for update in FROM clause 这个是我们在使用update或者delete语句时,在where条件里面加入的子查询导致的。例如如下的update语句: update table set type = 'static' where id in ( select id from ws_product where first_name ='superman' ...
【详细错误】: Error Code: 1093. You can't specify target table '_Resume' for update in FROM clause. 【错误原因】:在更新或删除目标表中数据的时候如果使用子查询,目标表不能在子查询的From语句中出现~ 原程序改造为: 1createtabletmpas 2selectA.Idfrom_Resume A 3innerjoin_UserBonA.UserId=B.UserI...
Error Code 1093Posted by: Igor Kondrasovas Date: June 07, 2010 10:39AM Hello all, I'm trying to perform the following command in MySQL, but I'm getting error code 1093. Could you please help me correcting it so I can use in MySQL? I suppose I must use "sub queries", but ...
MySql 5.7 UPDATE 和 DELETE 导致的 error code [1093],错误信息Error:1093SQLSTATE:HY000(ER_UPDATE_TABLE_USED)Message:Youcan’tspecifytargettable‘%s’forupdateinFROM
处理MySQL删除数据时Error Code: 1093. You can't specify target table '表名' for update in FROM clause 2011-12-29 14:41 −在执行:delete from _Resume where Id in(select A.Id from _Resume Ainner join _User B on&n... 伴老
1、.所以MYSQL中尽量使用in不要用exists。not in不能使用semi-join要小心使用,更不要用not exists 2、子查询DML应该修改关联DML(update delete) 3、ERROR 1093 (HY000)错误原因是 某张表既是修改的对象也是信息来源的对象。需要使用algorithm=temptable或者 optimizer_switch = 'derived_merge=off'的方式。
error code 于是更改语句:INSERT INTO readbook (readid,readpage,readcount,bookid,userid,readtime) VALUES ( (SELECT*from (SELECT readid From readbook where userid=1and bookid=1and readpage=5) as a ),5,1,1,1,now()) ON duplicate key UPDATE 提⽰插⼊成功。之所以能成功是因为,1093错误...
Description:delete from services where service_id in (select s1.service_id from services s1 left join services s2 on s1.uplink_service_id = s2.service_id where s1.uplink_service_id <> 0 and s2.service_id is null ) Error Code : 1093 You can't specify target table 'services' for ...
Error Code : 1093Posted by: ankit jain Date: May 21, 2010 03:33AM Hi Folks, Please help me executing this update query. UPDATE A SET IS_DELETED = "N" WHERE A.id IN (SELECT DISTINCT A.id FROM B, A, C WHERE ((A.item = C.item OR B.item = C.item) AND DATEDIFF(...