SQL语句小计

1. 联表删除 

(1)用  delete from a  where id in (select aid from  b where bid>100)  缺点  当 a,b表数据量大时根本删不动

(2)delete a from  a,b where  a.id=b.aid and bid>100  这样删除会快非常多

posted @ 2018-03-17 11:35  change_4_now  阅读(286)  评论(0)    收藏  举报