这个前提id吃从1开始的~
select top 3 * from 表名 order by id desc 也可以
或者你查找到后显示前三条
sql = "select * from (select * from 表名 order by id desc) where rownum <3"
select scrname,stucount from scrtabselect top 3 scrname,stucount from scrtab order by stucount
先按人数排序,然后在查出前三个
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)