ASP.NET (35) SQL (25) JAVASCRIPT (24) HTML (14) STYLE SHEET (6) ASP (4) SCRIPT (1)

Search me out HERE!!

Use of ISNULL in SQl Server

Here is the solution to replace NULL with some value in Query itself.
Consider following table:

TESTING

No Data
1 ASP.NET
2 PHP
3 null

Now Run this Query
SELECT ISNULL(data,'0') AS RESULT FROM TESTING

OUTPUT WILL BE:
No Data
1 ASP.NET
2 PHP
3 0

No comments:

Post a Comment