This page's ID: 5402
Welcome to the OzoneAsylum FaqWiki Frequently Asked Questions Server Side Coding MySQL
There are a number of ways to do this. Use: WHERE 'something' <> 'something_else' or: WHERE 'something' != 'something_else' As they are identical. or you can specify a number of values you don't want to be return from your column/field (my_tablein this example) - a more efficient way of doing things if you have a lot of values: WHERE my_table NOT IN ('something', 'something_else'); ----------------------------- Relevant links: select problem with "not equal" syntax Comparison Operators Mysql Pocket Reference Using the SQL SELECT Statement with MySQL Using MySQL with Perl ----------------------------- Relevant notes: At the time of writing this FAQ was ranked number 1 at Google for the terms sql, statement, using, not, equal, to and 7 for sql, not, equal . ______________________ Emperor (Added by: Emperor on Fri 08-Nov-2002) (Edited by: Emperor on Thu 01-May-2003)
« Backwards — Onwards »