代码改变世界

2014年10月27日

2014-12-23 19:18  wangduqiang  阅读(94)  评论(0编辑  收藏  举报

select * from s_qf q where q.yf not in (select l.yf from s_lf_history l where l.yhid = q.yhid )

 

select * from s_qf q where q.yhid not in (select l.yhid from s_lf_history l where l.yf = q.yf )

的区别

 

公司强人写的

select t.* from s_qf t where not exists (select t2.yhid from s_lf_history t2 where t2.yhid=t.yhid and t2.yf=t.yf)