Jump to content

Archived

This topic is now archived and is closed to further replies.

Woodburn2006

MySQL SELECT query

Recommended Posts

i am trying to get results from a DB where you search for a false condition.

for example, if i wanted to search for a 21 year old in my table, i would use: Select from tablename where age='21'

but what i want to do is search for everybody who is not 21. so the code would be something like this: SELECT FROM tablename WHERE (age is not equal to)21

hard to explain but if anybody has any ideas then please let me know
thanks

Share this post


Link to post
Share on other sites
where age <> '21'

or where age not like '21'

or where age != '21'

or where age >= '22' AND age <= '20'

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.