数据库users
id email cookie status
1 a@java-er.com aa 2
2 f@java-er.com bb null
3 b@java-er.com cc 1
4 d@java-er.com dd 3
select * from users where status not in (1,3)
第二条记录不出来
所以要改成
select * from users where (status not in (1,3) or status is null)
in不受影响
select * from users where status in (1,3)