Table1 ID Name Dept 1 A NULL 2 B IT 3 C IT 4 D NULL i need output as follows ID Name Dept 1 A NULL 4 D NULL
select * from Table1 where Dept!='IT' OR Dept IS NULL
--If you want to get All NULL value SELECT * FROM Table1 WHERE Dept IS NULL --If you want to get All which are not NULL value SELECT * FROM Table1 WHERE Dept IS NOT NULL
select * from table1 where Dept is null;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)