This topic is locked

SQL Query

8/18/2005 4:28:21 PM
PHPRunner General questions
E
edgerton author

I have a SQL database consisting of 5 columns. I want to know if it's possible to exclude some particular data from those columns. (Example - one column is a "name" column and I want to exclude the entries that have modem in the field.)
Is there a way to do this perhaps with the "where" clause?

prleo1 8/18/2005

You can use the NOT predicate in the WHERE CLAUSE of your SQL statement.
example.
Select * from employees WHERE emp_status NOT LIKE "%fired"

501227 8/19/2005

Thank you, that worked.
However are you able to do multiple "where" clauses to exclude more than one item?

E
edgerton author 8/19/2005

I figured out how to do multiple WHERE statements.
Thanks again for your help.

prleo1 8/19/2005

You might also want to look at Subqueries. What type of database are you working on? MySQL, Oracle, Access....?