Solution of ErrorCode: 1093 and ErrorCode: 1175 when MySQL is updated bitsCN.com
Solution for MySQL update with Error Code: 1093 and Error Code: 1175
MySQLSQL
Error Code: 1093. You can't specify target table 'Ws _ product' for update in FROM clause
This is caused by the subquery added to the where condition when we use the update or delete statement. For example, the following update statement:
update table set type = 'static' where id in (select id from ws_product where first_name ='superman');
Modify the preceding statement as follows to solve the problem:
update ws_product set type = 'static' where id in (select id form ( select id from ws_product where first_name ='superman') xx);
Error Code: 1175. you are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences-> SQL Queries and reconnect.
The solution is to execute the following statement in the current session:
SET SQL_SAFE_UPDATES = 0;
Then execute the Update statement.
BitsCN.com