Equal

SELECT * FROM People WHERE LName='Smith'

The SQL Statement above will retrieve

ALL fields: SELECT *

From the table named People: FROM People

With the requirement that the LName is Smith: WHERE LName='Smith'

If this is the original table
People
FNameLNameCategory
JohnSmith1
AlJones2


Your recordset returned would be this:
People
FNameLNameCategory
JohnSmith1


IF YOU ARE COMPARING TO A NUMBER, LEAVE OUT THE QUOTES!!!
SELECT * FROM People WHERE Category=2

The SQL Statement above will retrieve

ALL fields: SELECT *

From the table named People: FROM People

With the requirement that the Category is 2: WHERE Category=2

If this is the original table
People
FNameLNameCategory
JohnSmith1
AlJones2


Your recordset returned would be this:
People
FNameLNameCategory
AlJones2



Come learn HTML or Classic ASP in Honolulu, Hawaii!

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