战争仪式 树人天赋:sql语句中如何 查询结果显示中间几行
来源:百度文库 编辑:高校问答 时间:2024/05/08 17:52:58
在语句最后加上 显示
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 关键字来约束.