Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Coalesce

Author  Topic 

DBA007
Posting Yak Master

145 Posts

Posted - 2008-12-23 : 05:14:28
Hi All,
Can any one tell me what is the use and Definition of Coalesce in sqlserver

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2008-12-23 : 05:27:54
coalesce will return the first non null value in the function
and refer books online further data
Go to Top of Page

Jai Krishna
Constraint Violating Yak Guru

333 Posts

Posted - 2008-12-23 : 05:32:48
Refer Books On Line

For Ex

DECLARE @var1 INT,@var2 INT
SELECT @var1 = 10

SELECT COALESCE(@var2,@var1)

The Above Query Selects The First Non Null Value

Jai Krishna
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-12-24 : 04:23:35
quote:
Originally posted by DBA007

Hi All,
Can any one tell me what is the use and Definition of Coalesce in sqlserver


Did you search it in google?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -