如题所述
å¨sqlä¸
空å¼æNULL å''çå½¢å¼
å½æ¯NULLçæ¶åç¨ IS NULLå¤æ
å½æ¯''çæ¶åç¨ =''å¤æ
æ¯å¦
select * from table where enddate IS NULL;
select * from table where str='';
空å¼æNULL å''çå½¢å¼
å½æ¯NULLçæ¶åç¨ IS NULLå¤æ
å½æ¯''çæ¶åç¨ =''å¤æ
æ¯å¦
select * from table where enddate IS NULL;
select * from table where str='';
温馨提示:答案为网友推荐,仅供参考
第1个回答 2017-01-10
select * from a where (a.col is null or a.col='' )
第2个回答 2017-01-10
colname is null 试试