有个表叫fff ,a,b,c,d是它的4列
fff(a,b,c,d)
问,显示出 以c列排序,行号大于3的记录
该怎么写sql语句啊?
fff(a,b,c,d)
问,显示出 以c列排序,行号大于3的记录
该怎么写sql语句啊?
解决方案 »
- oracle远程连接----ORA-12560: TNS: 协议适配器错误
- ORACLE问题大家帮下忙
- 批量把表导成文件,高手进来
- oracle 的字符与参数的连接
- 这种写法有没有其它要注意的:update id set (a,b,c)=(select a,b,c from ida where ida.id=id.id) where ……;
- 安装问题?
- 再请教!
- 急!找ORACLE单机版
- oracle表中某个字段的值是一条插入语句,怎么写存储过程调出来执行
- oracle asm disk > 2T?
- 开发环境是oracle8,vb6.0,连接方式是oo4o oracle object for OLE 出现的问题是oip-04099
- oracle卸载问题
from fff order by c)
where rednum>3
(select ROW_NUMBER() OVER(ORDER BY c) AS 'row',fff.a a,fff.b b,fff.c c,fff.d d
from fff) where row>3
(select a,b,c,d,rownum from ffff order by c) tb
where rownum > 4
(select rownum as r,a,b,c,d from fff)
where r>3)
order by c;
from fff where r > 3
from fff where r > 3
from (select rownum ro,a,b,c,d
from fff)
where ro>3
orderby c;
from (
select row_number, *
from fff
where row_number > 3
order by c
)
from (SELECT rownum xx, a ,b,c ,d
FROM ffff order by c) where xx >3
from (select rownum as s,a,b,c,d
from fff
where s> 3 )
order by c;
不是!!!如下一个例子(orcale):只能用小于的情况
select * from (select * from fff order by c) where rownum<=3;
可以用大于的情况
select * from
(select rownum myrow,a.* from
(select * from fff order by c) a
)
where myrow>=3 and myrow<=5;
from (select a,b,c,d from fff group by a,b,c,d order by c))
where rownum <=(select count(*) from fff)
minus
select * from (select rownum,a,b,c,d
from (select a,b,c,d from fff group by a,b,c,d order by c))
where rownum <=3
前三条
select * from (select * from test order by num ) where rownum<3
后三条
select * from (select * from test order by num desc) where rownum<3
15楼正确,行号大于3不明白意思,是要显示前3条记录还是除了前三条以后的数据,
前三条
select * from (select * from test order by C ) where rownum <3
后三条
select * from (select * from test order by C desc) where rownum <3