数据库表:a b c
2 w NULL
3 e r
4 r NULL那么查询c列中不等于r的记录:select a,b from tb where c<>'r'
但是查询不出结果
如果把c列中的NULL去掉
在:select a,b from tb where c<>'r'
就查询出记录了
2 w NULL
3 e r
4 r NULL那么查询c列中不等于r的记录:select a,b from tb where c<>'r'
但是查询不出结果
如果把c列中的NULL去掉
在:select a,b from tb where c<>'r'
就查询出记录了
select a,b from tb where isnull(c,'')<>'r'