6
Reply

How to replace null value in sql server?

    using 3 methods: 1- isnull () , case statement, coalesce ()

    Please refer the below link.http://www.c-sharpcorner.com/UploadFile/219d4d/different-ways-to-replace-null-in-sql-server/

    To replace null with a specified replacement value, we can use any of the following:ISNULL() function CASE statement COALESCE() functionPlease refer the below link. http://www.c-sharpcorner.com/UploadFile/219d4d/different-ways-to-replace-null-in-sql-server/

    Using isnull function example:ISNULL(value,'replace new value')

    SELECT COALESCE(ColName, 0) from TableName

    SELECT ISNULL(colname, 0 ) FROM Emptable SELECT COALESCE(colname, 0 ) FROM Emptable