How to Retrieve record with Null Values in MS SQL
How to retrieve records from table which has null values.
Here is the Script which will list records which has null values for CountryID column.
select * from yourTable where CountryID is null
And if you want the Null values in the Table to be replaced by any other value use the following Script. Both Script can get the job done, but using COALESCE is more faster and more efficient.
SELECT ISNULL(Column_Name,Replace_String) as ColumnName from TableName
SELECT COALESCE(COLUMN_NAME, REPLACE_STRING) as ColumnName FROM TABLE_NAME