sql: left join vs. not in

select * from product.login_info where username not in (select username from stat.totaluser)

vs.

select a.* from product.login_info as a left join stat.totaluser as b on a.username = b.username where b.username is null

上面2条sql语句的执行结果集是一样的

posted @ 2018-10-22 15:50  张建江  阅读(162)  评论(0编辑  收藏  举报