Here is the solution to replace NULL with some value in Query itself.
Consider following table:
TESTING
Now Run this Query
SELECT ISNULL(data,'0') AS RESULT FROM TESTING
OUTPUT WILL BE:
Consider following table:
| 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