摘要: 问题:delete from acct_item where subs_id not in(select subs_id from subs);我要处理一百万条数据,这条语句删了我近三个小时时间!答案:delete from acct_item a where not exists (select 1 from subs b where a.subs_id=b.subs_id )追问:这个select 1不明白什么意思啊?回答:简单理解就是不查询具体列,只要有值就显示1【我的理解:not in 的语义是“我的这个东些不在这里面”,因此要确认这个是否为真,还要有一个比较过程;not exists 阅读全文
posted @ 2011-10-11 20:14 eyye的眼睛 阅读(2747) 评论(0) 推荐(0) 编辑