Re: So what's null then if it's not nothing?

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Fri, 18 Nov 2005 22:42:45 +0100
Message-ID: <a9isn11842m04u34al8r2r80sp4vfj7lj9_at_4ax.com>


On 17 Nov 2005 18:20:50 -0800, michael_at_preece.net wrote:

>Rats! I just read that the ANSI standard says NULL is char(0)!

Hi Mike,

If you're referring to the ANSI standard for SQL, then I can only repeat what I wrote in my first message: start reading other books. Please. Now. Tear up, burn and throw away whatever you are currently reading, because it's an utter bag of nonsense.

The ANSI standard for SQL doesn't say anything about how vendors should implement any part of the standard.

Of course, ANSI has written lots of standards. The ASCII character set might well be one of them - and in ASCII, char(0) is indeed defined as NUL (null). The only thing that this null shares with SQL's null is the name.

Microsoft SQL Server uses an extra bit for distnguishing NULL from not NULL. I've read that Oracle represents NULL as an empty string (and gets lots of flack for it, because it violates the standard). I'm not sure how other DBs handle it - there might well be one or two out therre that acutally use char(0), but like Oracle, they would be violating the ANSI standard for SQL.

(snip Pick vs SQL DSW)

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Fri Nov 18 2005 - 22:42:45 CET

Original text of this message