mysql - #1093 - You can't specify target table 'cps' for update in FROM clause -
i trying update records select
but got error #1093 , code
update `tabcategories_products` set`categories` = 'cat00001' `categories` = 'cat00108' , `parent` not in ( select `parent` `tabcategories_products` `categories` != 'cat00108' )
mysql not allow update on select , solution such case there thing select update ?
thanks
wrap query in in
clause in query :
select t.* ( select `parent` `tabcategories_products` `categories` != 'cat00108') ) t
this subquery creates implicit temporary table t
, doesn't count table updating.
Comments
Post a Comment