Heim >Datenbank >MySQL-Tutorial >SQL语句查询是否为空 =null及null

SQL语句查询是否为空 =null及null

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:58:311652Durchsuche

SQL语句查询是否为空 =null及null实现代码。

a b c d

980515 精頂企業有限公司 簡家豪 NULL

980514 全欣木業有限公司 NULL 123

980514 迅億科技股份有限公司 簡逢浚 NULL

980515 聖越國際企業有限公司 NULL 111

表结构如上所示,要查询C列为空的记录的SQL语句不是select * from table where c=null; 或者 select * from table where c=''; 而应当是 select * from table where c is null; 相反地要查询不为空的则应当是 select * from talbe where c''; 或者 select * from table where c is not null; 注意:不是not is null哦。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:远程连接SQLSERVER 2000服务器方法Nächster Artikel:SQL SERVER 自增列