top子句用于规定要返回的记录的数目(并非所有数据库系统都支持top子句)
选取头两条记录:select top 2 * from Persons
选取50%的记录:select top 50 percent from Persons
like 操作符 用于在where 子句中搜索列中的指定模式。
提示:"%"
可用于定义通配符(模式中缺少的字母)。
从Persons表中选取居住在以"g"结尾的城市里的人:
select * from persons where City like '%g'
从Persons 表中选取居住在不包含“lon”的城市里的人(使用NOT关键字):
select * from Persons where city not like '%lon%';