select * from xxx where xx
SELECT * FROM Persons WHERE City LIKE '%lond%'
SELECT * FROM Persons WHERE City NOT LIKE '%lon%'
SELECT * FROM Persons WHERE FirstName LIKE '_eorge'
使用 AND 来显示所有姓为 "Carter" 并且名为 "Thomas" 的人:
SELECT * FROM Persons WHERE FirstName='Thomas' AND
LastName='Carter'
使用 OR 来显示所有姓为 "Carter" 或者名为 "Thomas" 的人:
SELECT * FROM Persons WHERE firstname='Thomas' OR
lastname='Carter'
我们也可以把 AND 和 OR 结合起来(使用圆括号来组成复杂的表达式):
SELECT * FROM Persons WHERE(
FirstName='Thomas'OR
FirstName='William')
AND
LastName='Carter'