HI WELCOME TO KANSIRIS

Replacing NULL with 0 in a SQL server query

Leave a Comment
When you want to replace a possibly null column with something else, use IsNull.
SELECT ISNULL(myColumn, 0 ) FROM myTable
This will put a 0 in myColumn if it is null in the first place.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.