MySQL also has a work around. You might try to rephrase your comparison as
WHERE not col <=> 'blah' the "<=>" operator is documented as a null-enabled equality check. That way if you are comparing null to null, you get a true or false and not another null. This comparator is available as of 3.23.0 http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine Keith Ivey <[EMAIL PROTECTED]> wrote on 10/25/2004 03:11:53 PM: > matt_lists wrote: > > > I cant tell if this is a bug or a feature. > > > > Select from table where col <> 'blah' > > > > I use this all the time with other databases, works great, gives me > > everything that's not "blah" > > > In SQL (not just MySQL), any comparisons involving NULL return NULL, > so if that was working in some other database, it's a bug in that database. > > See these pages about MS SQL Server and PostgreSQL (which does have a > workaround), for > example: > > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/acdata/ac_8_qd_02_8pwy.asp > http://www.sql.org/sql-database/postgresql/manual/functions-comparison.html > > -- > Keith Ivey <[EMAIL PROTECTED]> > Washington, DC > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >