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
)