Q:

Incorrect no. of rows fetched in SQL

Please consider a table named Employee with following two columns:

EmpId - Number(12)
EmpType - Varchar2(2 bytes)

EmpType has two valid values either ES or NULL.
When I fire below query I get 100 rows
select * from Employee;

Below query gives me 60 rows:
select * from Employee where EmpType = 'ES'

While select * from Employee where EmpType <> 'ES' gives me 0 rows. 
Why so? I should get 40 rows where EmpType is not ES.
I am working on Oracle Sql DB.

A:

Null does not equal anything, not even another null.  So to say not equal to ES, null is not not equal to ES.  If you get my meaning.
So to get the values you want you need is null.
select * from Employee where EmpType is null

Check out this article on handling null values
EDIT: As noted by @Allan, in Oracle an empty string is equivalent to null.

