MYSQL, is there a don't include?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
portem1
Forum Newbie
Posts: 3
Joined: Tue Jan 18, 2011 2:50 am

MYSQL, is there a don't include?

Post by portem1 »

Hi,

I am trying to create a table from information in my database but I dont want to include certain records. So far I have got:

SELECT * FROM areas GROUP BY county ORDER BY county_category

Is there way to say select all from areas but if county is equal to "xxxx", dont include this recored?

I'm sure there is an easy way of doing this but I can't seem to work it out, please can someone point me in the right direction.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: MYSQL, is there a don't include?

Post by Darhazer »

SELECT * FROM areas WHERE country NOT IN('xxxx') GROUP BY county ORDER BY county_category
Post Reply