List:General Discussion« Previous MessageNext Message »
From:Andy Wallace Date:July 29 2010 9:13pm
Subject:Re: IS NULL returns Empty set, but I have empty items
View as plain text  
blank is not null... I'll bet if you did

SELECT url FROM product WHERE url = '';

you'll get a row or three. If the field was NULL, your product_id
select would look like:

  +------+
  | url  |
  +------+
  |NULL  |
  +------+

andy

Norman Khine wrote:
> Hello,
> I don't know what I am missing, but I have this:
> 
> mysql> SELECT url FROM product WHERE url IS NULL;
> Empty set (0.05 sec)
> 
> mysql> SELECT url FROM product WHERE product_Id = 67;
> +------+
> | url  |
> +------+
> |      |
> +------+
> 1 row in set (0.00 sec)
> 
> what goes with this, how can i ensure that this is NULL?
> 
> here is the table structure
> 
> http://pastie.org/1066140
> 
> thanks for any insight.
> 
> 

-- 
Andy Wallace
iHOUSEweb, Inc.
awallace@stripped
(866) 645-7700 ext 219
--
There are two ways to build software:
Make it so simple that there are obviously no bugs,
or make it so complex that there are no obvious bugs.
Thread
IS NULL returns Empty set, but I have empty itemsNorman Khine29 Jul
  • Re: IS NULL returns Empty set, but I have empty itemsAndy Wallace29 Jul
  • Re: IS NULL returns Empty set, but I have empty itemsDan Nelson29 Jul
    • Re: IS NULL returns Empty set, but I have empty itemsNorman Khine30 Jul