SQL Null

I am seriously confused by whatever it is that makes SQL (At least PL/SQL and T-SQL) consider null in a completely different way then anything else.

If I write a query

SELECT *FROM table1WHERE column1 = 0

Then of course if column1 hasn’t been filled yet it won’t return anything since null != 0

Sooo, then why is it that this query

SELECT *FROM table1WHERE column1 != 1

Won’t return anything at all either.

I understand that null is not really like anything else, but to exclude it when looking for something in a certain column seems odd to me, or am I missing something?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s