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

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Thu, 15 Dec 2005 22:38:25 +0100
Message-ID: <t4o3q19oa2d8doa5j6a3jnhlcfdrcerrr2_at_4ax.com>


On Thu, 15 Dec 2005 09:23:39 +0100, Jon Heggland wrote:

>In article <3r81q1d8cfefnht3bkfo97ojcd1seail77_at_4ax.com>,
>hugo_at_pe_NO_rFact.in_SPAM_fo says...
>>
>> Here's what the standard says about comparisons between "booleans":
>>
>> "4.5.2 Comparison and assignment of booleans
>>
>> All boolean values and SQL truth values
>
>That's a strange phrase. Does the standard separate between "boolean"
>and "SQL truth value"?

Hi Jon,

Yeah, I was surprised by that phrase as well. I didn't study the complete standard, but I *think* that a boolean value is what's stored in a column with datatype boolean and a SQL truth value is the result of evaluating a proposition. I guess that there are some differences between the two. <shrug>

>
>> are comparable and all are
>> assignable to a site of type boolean. The value True is greater than the
>> value False, and any comparison involving the null value or an Unknown
>> truth value will return an Unknown result.
>
>Thanks! This pretty much concludes the thread for my part.
>
>> The values True and False may
>> be assigned to any site having a boolean data type; assignment of
>> Unknown, or the null value, is subject to the nullability
>> characteristics of the target."
>
>So we can all agree that a NOT NULL boolean column is a true boolean?
>This, at least, justifies the name somewhat.

Based on what I've read about the boolean datatype in SQL-99, I'm inclinde to agree that a NOT NULL boolean column behaves as we'd expect a boolean in a two-valued logic system to behave.

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Thu Dec 15 2005 - 22:38:25 CET

Original text of this message