mysql中 对同一个表先查询后删除时报错,怎么破的问题

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
)

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章