如何隐藏选择查询中的空值 [英] how to hide null values from a select query
本文介绍了如何隐藏选择查询中的空值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
姓名
======
KK
pp
yy
Null
Null
输出可以给出
名称
===
kk
pp
yy
Name
======
KK
pp
yy
Null
Null
out put can given
Name
===
kk
pp
yy
推荐答案
你可以试试这个:
You can try this :
SELECT * FROM yourTableName WHERE YourColumnName IS NOT NULL
祝你好运
Good luck
你也可以尝试这种方式
You can try this way also
SELECT * FROM yourTableName WHERE ISNULL(YourColumnName,'')<>''
--here first check whether the column is null , if it is then replace the value by '' and then compare
谢谢
thanks
这篇关于如何隐藏选择查询中的空值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文