如何用sql语句查出数据库某个表里的第几条数据

如题所述

第1个回答  2010-04-21
查询第五条
select * from 表名 where rownum = 5
第2个回答  2010-04-21
select *
from (select t.cno,t.cname,t.tno,rownum as num
from course t) t
where t.num = 8

比如8就是你要查的数据.
第3个回答  2010-04-21
select * from 表名 where 条件
第4个回答  推荐于2016-11-10
--SQL2005:
select top N * from table
except
select top (N-1) * from table

--SQL2000
select * from
(select top N * from table) a
where id not in
(select top N-1 id from table)本回答被提问者采纳
相似回答