NOT EQUAL (<>)/LESS THAN/GREATER THAN

SELECT * FROM People WHERE LName <>'Smothers'

The SQL Statement above will retrieve

ALL fields: SELECT *

From the table named People: FROM People

With the requirement that the LName is not Smothers: WHERE LName <> 'Smothers'

If this is the original table
People
FNameLNameCategory
JohnSmith1
AlJones2
FredSmothers2


Your recordset returned would be this:
People
FNameLNameCategory
JohnSmith1
AlJones2


Other relational operators:
<  LESS THAN
>  GREATER THAN
<=  LESS THAN OR EQUAL
>=  GREATER THAN OR EQUAL



Come learn HTML or Classic ASP in Honolulu, Hawaii!

HOME | SQL Tutorials | XML Tutorials | OKIWEB | EMAIL ME | ASP Alliance