Showing posts with label othervalue. Show all posts
Showing posts with label othervalue. Show all posts

Sunday, February 12, 2012

Change NULL to other value

Hi,
Are there some functions in Transact-SQL which can change NULL to other
value , like change NULL to 0.
SELECT COALESCE(x, 0) FROM (SELECT x = 1 UNION SELECT 4 UNION SELECT NULL) x
http://www.aspfaq.com/
(Reverse address to reply.)
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:Omk#8mlqEHA.536@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Are there some functions in Transact-SQL which can change NULL to other
> value , like change NULL to 0.
>
|||Yes. Use ISNULL
"ad" wrote:

> Hi,
> Are there some functions in Transact-SQL which can change NULL to other
> value , like change NULL to 0.
>
>