Question: This is just a question out of curiosity but I am looking at a database and pulling data from a table with a query on one of the columns. The column has four possible values `null`, `0`, `1`, `2`. When I run the query as:

```
SELECT * FROM STATUS WHERE STATE != '1' AND STATE != '2';

```

I get the same results as running:

```
SELECT * FROM STATUS WHERE STATE = '0';

```

I.e. rows with a null value in the top command in the queried column seem to be omitted from the results, does this always happen in SQL?

I'm running my commands through Oracle SQL Developer.

Answer: 
Yest it's normal, you can maybe put a database settings to fixed that

But you could modify your code and do something like that : 

```
SELECT * FROM STATUS WHERE STATE != '1' OR STATE != '2' or STATE is null;

```

Look at this for more info : 
<http://www.w3schools.com/sql/sql_null_values.asp>
use `NVL` like so: `SELECT * FROM STATUS WHERE NVL(STATE,'X') != '1' AND NVL(STATE,'X')!= '2';`