SQLServerCentral Editorial

No More NULL

,

One of the tricky things that developers new to SQL Server struggle with is the concept of NULL. Quite often I have seen people wonder why an empty string, or a zero, do no equate to NULL, or even why NULL does not equal NULL when searching. That fundamental idea of "unknown" just seems to be one that confuses many programmers.

The other day I was listening to a developer at Microsoft that is looking forward to SQL 11, and he let something slip. I suspect that this wasn't intended to get out, but it wasn't an NDA talk, and no disclaimers were given, so I don't think there is any reason I can't repeat it.

There won't be any NULL support in SQL 11.

No more worrying about ISNULL, or NULLIF, no more sticking in specialized code that deals with unknown values. Instead you'll need to actually put in data for all fields, relying on empty strings, or zeros, to signify missing data. The support for a "zero" date is still a work in progress, but it appears that strong support for "1/1/1900" as a base date is out there.

I think this is fantastic, and it will make developing databases much simpler in the future. Developers will no longer have to worry about missing information, and they'll just set a default value for all columns. I suspect that defaults will actually be required for all new fields in all tables, just to prevent errors. This also means that we'll get multi-table inset capabilities in views since all fields will have defaults and the order of values supplied will be used to populate rows in the base tables.

Of course, this is also an April Fool's joke and is in no way based on reality. It's entirely a work of fiction, and I hope you have a smile on your face at this point.

Steve Jones


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there.

You can also follow Steve Jones on Twitter:

Overall RSS Feed:

or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

Rate

5 (7)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (7)

You rated this post out of 5. Change rating