mysql删除或者更新数据时使用了查询,而查询的数据又做了删除或者更新的条件,mysql不支持这种方式。oracel和msserver都支持这种方式
采用下面方法可以
例如:
delete from ContentInfo where id in (
Select id From (select id from ContentInfo where bookNum='BK10002' Group By Name Having Count(*)>1 ) a )
格式
delete from 表名 where 字段 in (
Select id From (select id from 表名 where 字段='BK10002' Group By Name Having Count(*)>1 ) a )