On Wed, 1 Dec 2004, Brass Tilde wrote:

i've read the 'null handling' section and still not found the answer to
this
question:

   why should

     'select * from tbl where field=null'

   be any different from

'select * from tbl where field isnull'

The short answer is "because it's different".

A longer answer would reference the SQL-92 standard, talking about how any
comparison involving null will resolve to false, including "null = null".
Null is defined to be not equal to anything, including null.

You *must* use "is null" to check for null, that's the way the SQL language
is implemented, and it's the way that all SQL-92 compliant implementations
are supposed to behave.

hmmm. that's a good answer, but from the docs:

"SQL As Understood By SQLite

The SQLite library understands most of the standard SQL language. But it does
omit some features while at the same time adding a few features of its own.
This document attempts to describe precisely what parts of the SQL language
SQLite does and does not support. A list of keywords is given at the end."


i guess what i'm driving at is that, given that sqlite is not sql-92 compliant, there seems to be good reason for this behaviour.

oh well.  guess i'll live with it.

thanks for the response.

-a
--
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself.  --Shunryu Suzuki
===============================================================================

Reply via email to