2008/6/6 Mike Holden <mythtv at mikeholden.org>:
> Nick Morrott wrote:
> <snip>
>
> ... In Oracle, an empty string is equivalent to
> null.
>
Well, that's good to know!! (So, that's why people swear about Oracle).
>> I don't know if mysql works this way as well, but it would explain the
> issue we are seeing if the code is testing for equality between 2 empty
> string values if it does work the same way as Oracle.
It would appear this isn't true in MySQL.
mysql> select count(*) FROM users WHERE ''='';
+----------+
| count(*) |
+----------+
| 17 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) FROM users WHERE NULL=NULL;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) FROM users WHERE NULL IS NULL;
+----------+
| count(*) |
+----------+
| 17 |
+----------+
1 row in set (0.00 sec)
mysql>
Infact... that's really f'd up! It's almost as annoying as Sybase treating '
' and '' as the same thing. (although that's a setting which can be changed
in later versions.)
I
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080606/17482b76/attachment.htm