"P.Peti" wrote:
> 
> Hello,
> 
> >And
> >SELECT COUNT(*) FROM FILM WHERE COMMENT IS NULL:
> >
> >returns what?
> 
> Sure, I forgot to mention that I know it's all about the
> NULL values, i can correct the "problem" (maybe not a
> problem but I think it's a weird behavior) i just don't
> understand why?
> 
> The query you mentioned returns 35, added to #"!deleted"
> equals the total row count.
> 
> It just seems to be weird that a subset and its complement
> does not equal the whole table. So the thing is:
> 
> #"!deleted" doesn't include "#NULL" as the set filtered by
> the clause 'WHERE comment!="deleted"' doesn't include NULL
> value comments. This is what I don't understand.
> 
> Bye:
>          PP.


1. Read the manual.

2. Take a course in database design, or read a good SQL book.
   "MySQL" by DuBois ( New Riders) is a good one.

3. This is pretty basic SQL stuff, and is correct. This is NOT a
"problem" as you described it.
   When you don't specify NOT NULL when creating the column, you have to
program for the
   NULL or "Unknown value" which is neither equal to or not equal to any
value.
   It isn't even equal to NULL. It "IS NULL."  Everything else "IS NOT
NULL."

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to