IS NULL returns Empty set, but I have empty items
IS NULL returns Empty set, but I have empty items
am 29.07.2010 22:58:38 von Norman Khine
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 =3D 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.
--=20
ËuÊop Çpısdn p,uɹnÊ p×ɹoÊ =C7=
É¥Ê=87 ÇÇs noÊ 'ÊuÇɯÉ× s=
ÇÉ¯Ä±Ê ÇÉ¥Ê puÉ 'ÊuÇÊuo=
É
Çq s,ÊÇ× ÊÇÊ
%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: IS NULL returns Empty set, but I have empty items
am 29.07.2010 23:13:13 von Andy Wallace
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@ihouseweb.com
(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.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: IS NULL returns Empty set, but I have empty items
am 29.07.2010 23:29:12 von Dan Nelson
In the last episode (Jul 29), Norman Khine said:
> 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?
Your url may be the empty string "". If it was really NULL, you would see
"NULL" in the resultset. Try
SELECT * FROM product WHERE url=""
--
Dan Nelson
dnelson@allantgroup.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: IS NULL returns Empty set, but I have empty items
am 30.07.2010 05:11:34 von Norman Khine
thank you, this makes sense.
On Thu, Jul 29, 2010 at 11:29 PM, Dan Nelson wrot=
e:
> In the last episode (Jul 29), Norman Khine said:
>> 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 =3D 67;
>> +------+
>> | url  |
>> +------+
>> | Â Â Â |
>> +------+
>> 1 row in set (0.00 sec)
>>
>> what goes with this, how can i ensure that this is NULL?
>
> Your url may be the empty string "". Â If it was really NULL, you wou=
ld see
> "NULL" in the resultset. Â Try
>
> SELECT * FROM product WHERE url=3D""
>
> --
> Â Â Â Â Dan Nelson
> Â Â Â Â dnelson@allantgroup.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: Â Â http://lists.mysql.com/mysql?unsub=3Dnorman@=
khine.net
>
>
--=20
ËuÊop Çpısdn p,uɹnÊ p×ɹoÊ =C7=
É¥Ê=87 ÇÇs noÊ 'ÊuÇɯÉ× s=
ÇÉ¯Ä±Ê ÇÉ¥Ê puÉ 'ÊuÇÊuo=
É
Çq s,ÊÇ× ÊÇÊ
%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg