如何在SQL中解决isnull() [英] how to solve isnull () in SQL

查看:140
本文介绍了如何在SQL中解决isnull()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Team,



Hello Team,

-----------------heere we want Updated By Name

select  c.ID as CUSTOMERLOANDATAID,c.FIRSTNAME,c.LASTNAME,
 isnull(UU.FIRSTNAME + ' '+ UU.LASTNAME,'') as  UpdatedByName
 from CUSTOMERLOANDATA c with(nolock)
Left Outer join USERMASTER UU (nolock) on UU.ID = C.UpdatedBy
where FILELOGID=(select top(1) filelogid  from CUSTOMERLOANDATA with(nolock) where
 QCUSERID = 13
ORDER BY FILELOGID)
and
 QCUSERID = 13
 ORDER BY FILELOGID, RECORDNO





isnull是什么(UU.FIRSTNAME +''+ UU.LASTNAME,'')意思是???



请告诉我..



谢谢

Harshal



what does isnull(UU.FIRSTNAME + ' '+ UU.LASTNAME,'') it mean ???

please let me know ..

Thanks
Harshal

推荐答案

read这个链接可以解决您的问题



ht tp://technet.microsoft.com/en-us/library/ms184325.aspx [ ^ ]
read this link to clear your problem

http://technet.microsoft.com/en-us/library/ms184325.aspx[^]


假设Column值为null

Assume the Column value is null
select (columname,0)Amount from table



然后结果是


then the result is

Amount
null





但是如果你使用isnull函数



but if you using isnull function

select isnull(columname,0)Amount from table




Amount
0


这篇关于如何在SQL中解决isnull()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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