如何获取单个表insql server的多列的空值行 [英] how to get null value row of multiple columns of single table insql server

查看:87
本文介绍了如何获取单个表insql server的多列的空值行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server中获取单个表的多列的空值



i有一些表有多列,每个column包含一些值或null值。



所以如何获取包含每列空值的行。

解决方案

 选择 * 
来自 yourtable
其中 COALESCE (col1,col2,col3, ' allnull')= ' allnull'


how to get null value row of multiple columns of single table in sql server.

i have some table with multiple column and each column contain some value or also null value .

so how to get row with contain null value of each column.

解决方案

select *
from yourtable
where COALESCE(col1,col2,col3,'allnull') = 'allnull'


这篇关于如何获取单个表insql server的多列的空值行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆