<br><br><div class="gmail_quote">2008/6/6 Mike Holden <<a href="mailto:mythtv@mikeholden.org">mythtv@mikeholden.org</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">Nick Morrott wrote:<br>
<snip></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Wj3C7c"></div></div>... In Oracle, an empty string is equivalent to<br>
null.<br>
</blockquote><div><br>Well, that's good to know!! (So, that's why people swear about Oracle).<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I don't know if mysql works this way as well, but it would explain the<br>
issue we are seeing if the code is testing for equality between 2 empty<br>
string values if it does work the same way as Oracle.</blockquote><div><br>It would appear this isn't true in MySQL. <br><br>mysql> select count(*) FROM users WHERE ''='';<br>+----------+<br>| count(*) |<br>
+----------+<br>| 17 |<br>+----------+<br>1 row in set (0.00 sec)<br><br>mysql> select count(*) FROM users WHERE NULL=NULL;<br>+----------+<br>| count(*) |<br>+----------+<br>| 0 |<br>+----------+<br>1 row in set (0.00 sec)<br>
<br>mysql> select count(*) FROM users WHERE NULL IS NULL;<br>+----------+<br>| count(*) |<br>+----------+<br>| 17 |<br>+----------+<br>1 row in set (0.00 sec)<br><br>mysql><br><br>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.)<br><br>I<br></div></div><br>