create temporary table tbd(id int) select id from d where para <> 1234;
delete from t1 where id in (select id from tbd);
delete from t2 where id in (select id from tbd);
delete from t3 where id in (select id from tbd);
delete from t4 where id in (select id from tbd);
drop table tbd;
新手求教,有无改进空间?怎么改进?
------解决方案--------------------
delete t1 from t1,d where t1.id=d.id; delete t1 from t2,d where t2.id=d.id; delete t1 from t3,d where t3.id=d.id; delete t1 from t4,d where t4.id=d.id;
------解决方案-------------------- explain ...不就知道了吗
------解决方案--------------------