1.mysql中 对同一个表先查询后修改时报错,怎么破的问题:
update c set name='ju' where id in(
select id from c where id=3
)
2.在sql查询外面嵌套一个sql查询:
update c set name='ju' where id in(
select id from (
select id from c where id=3
) as p
)
3.重新查看结果:
2.mysql中对同一个表先查询后修改时报错,怎么破的问题:
delete from enterprise_base_info where id in (
select id from (
select id from bocportal.enterprise_base_info
where (stock_code='' or company_abbreviation='') and syncStatus=9 ) as a
)