The definition of table 'table1' prevents operation UPDATE on table 'table2' 的解决方法
执行下面的SQL,就会报 The definition of table 'table1' prevents operation UPDATE on table 'table2'
update table2 set item = replace(item,'A27-','A28-') where id in(select id from table1 where item like 'A27-%' and status>=1 and online=1)
修改为如下方式即可
update table2 set item = replace(item,'A27-','A28-') where id in(select id from (select id from table1 where item like 'A27-%' and status>=1 and online=1) b)
留下你的看法: