sql语句求

来源:百度知道 编辑:UC知道 时间:2024/05/04 16:15:13
表f,a,b,c,d4列。
显示一C排序,排序后序号大于3的记录。

select * from f where rownum>3 order by c

select * from f where rownum>=3 order by c

哪个是序号啊?

select * from f where rownum>=3 order by c
可以这么写,能达到效果
但如果用在处理比较多的数据时还是建议这么写可以节约时间
select * from (select * from f where rownum>=3) as table order by c
先找到序号大于等于3的再排序就不会有很多数据了
看你要用在什么地方了如果用在oracle中就得换中写法了