限制结果集的行数
最大的作用,用于分页,防止信息过多,过载导致机器当机。
select * from T_Employee
order by FSalary DESC
选出前三名:
select top 3 * from T_Employee
order by FSalary DESC
检索按照工资从高到低排序
从第六位开始一共三个人的信息:
select top 3* from T_Employee
where FNumber
not in
(select top 5 FNumber from T_Employee order by FSalary DESC )
order by FSalary DESC