MySQL Error 1093 - Cant specify target table for update in FROM clause This is what I did for updating a Priority column value by 1 if it is >=1 in a table and in its WHERE clause using a subquery on same table to make sure that at least one row contains Priority=1 (because that was the condition to be checked while performing update) :
sql - How do I fix my MySQL error 1093 - Stack Overflow [Err] 1093 - You can't specify target table 'user_log' for update in FROM clause DELETE user_log FROM user_log WHERE UpdateDate < (SELECT MAX(UpdateDate) FROM user_log AS lookup WHERE Email = user_log Email) Let me know
You cant specify target table for update in FROM clause UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1); ERROR 1093 (HY000): Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data From MariaDB 10 3 2, the statement executes successfully: UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
mysql error code 1093: You cant specify target table for update in . . . create view foo_data as ( select o id_customer,o id_address_delivery,o id_address_invoice from orders as o inner join customer as c on o id_customer = c id_customer where c email like '[email protected]' limit 1) update orders as o inner join foo_data as f on f id_customer = o id_customer set optimizer_switch = 'derived_merge=off', set o id_customer = f id_customer, set o id_address_delivery
mysql - ERROR 1093 (HY000): You cant specify target table a for . . . ERROR 1093 (HY000): You can't specify target table 'a' for update in FROM clause I can create temporary table and keep the result of the sub-query and then do the UPDATE But I don't want to do in this way Can someone suggest me better way of doing this?
MySQL error 1093. how to delete from this - Stack Overflow Select worked: select * from A where A id not in ( select id from A as a inner join B as b where (a `name` = b `name` and a `status` = b `description`)) delete doesn't work: delete from pre_l