郑州户口有什么好处:sql语句中如何 查询结果显示中间几行
来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 01:05:49
在语句最后加上 显示
limit n 前n行
limit n,m 第n行到第n+m行
order by colname desc limit n 后n行
select distinct top 3 * from table order by score
第5-10行
select top 5 * from 表 where not id in (select top 5 id from 表)
查询返回限制的行数用top 关键字来约束.