Sometime you have to select values from your SQL Server table if record has null value or not. For example I have below table in design mode and with records.

Image 1.

Image 2.
Now Write Query to Select All records
- SELECT * FROM EMPLOYEE

Image 3.
Now if you want to fetch those records who have EXPERIENCE as null. You will want to write your query like below.
- SELECT * FROM EMPLOYEE WHERE EXPERIENCE = NULL
- SELECT * FROM EMPLOYEE WHERE EXPERIENCE = 0
- SELECT * FROM EMPLOYEE WHERE EXPERIENCE < 1

Image 4.
Now write your query like below.
- SELECT * FROM EMPLOYEE WHERE EXPERIENCE IS NULL

Image 5.
- SELECT * FROM EMPLOYEE WHERE ISNULL(EXPERIENCE,0)=0

Image 6.
Now query to select All records where Experience is Not Null
- SELECT * FROM EMPLOYEE WHERE EXPERIENCE IS NOT NULL

Image 7.

Rahul Kumar SaxenaPosted May 2, 2015, 9:01 PM
Thanks Santhakumar Munuswamy
Rahul Kumar SaxenaPosted May 2, 2015, 9:01 PM
Thanks nitin tyagi
Santhakumar MunuswamyPosted May 1, 2015, 11:45 AM
Good
NitinPosted May 1, 2015, 6:57 AM
nice