AndieB Posted April 18, 2008 Share Posted April 18, 2008 Hi all, I have a black-out... what is the syntax for quering a table and exlude something... ie. query table "country" and exclude all rows that is equal to "Sweden". I've lost it all in my head... Sincerely, Andreas Quote Link to comment Share on other sites More sharing options...
fenway Posted April 18, 2008 Share Posted April 18, 2008 You mean != ? Unless it's via a LEFT JOIN.. IS NULL. Quote Link to comment Share on other sites More sharing options...
ergecs Posted April 18, 2008 Share Posted April 18, 2008 SELECT * FROM `countries` WHERE name NOT IN ('Sweden') OR SELECT * FROM `countries` WHERE name != 'Sweden' Quote Link to comment Share on other sites More sharing options...
AndieB Posted April 28, 2008 Author Share Posted April 28, 2008 Thank you!! Quote Link to comment Share on other sites More sharing options...
fenway Posted April 28, 2008 Share Posted April 28, 2008 No index usage... be careful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.