ORALCE12C——分页 体验
来源:互联网 发布:ubuntu 启动进入grub 编辑:程序博客网 时间:2024/04/30 10:39
ORALCE12C分页 体验
1、登陆
sqlplus SYSTEM/MANAGER@ORALCE12C
随意找个记录多的表练习,例如:表[help],共有938行记录
2、语法简介
语法介绍
row_limiting_clause
The row_limiting_clause
allows you to limit the rows returned by the query. You can specify an offset, and number of rows or percentage of rows to return. You can use this clause to implement top-N reporting. For consistent results, specify the order_by_clause
to ensure a deterministic sort order.
OFFSET
Use this clause to specify the number of rows to skip before row limiting begins. offset
must be a number. If you specify a negative number, then offset
is treated as 0. If you specify NULL, or a number greater than or equal to the number of rows returned by the query, then 0 rows are returned. If offset
includes a fraction, then the fractional portion is truncated. If you do not specify this clause, then offset
is 0 and row limiting begins with the first row.
ROW | ROWS These keywords can be used interchangeably and are provided for semantic clarity.
FETCH
Use this clause to specify the number of rows or percentage of rows to return. If you do not specify this clause, then all rows are returned, beginning at row offset
+ 1.
FIRST | NEXT These keywords can be used interchangeably and are provided for semantic clarity.
rowcount | percent PERCENT Use rowcount
to specify the number of rows to return. rowcount
must be a number. If you specify a negative number, then rowcount
is treated as 0. If rowcount
is greater than the number of rows available beginning at row offset
+ 1, then all available rows are returned. If rowcount
includes a fraction, then the fractional portion is truncated. If rowcount
is NULL, then 0 rows are returned.
Use percent
PERCENT
to specify the percentage of the total number of selected rows to return. percent
must be a number. If you specify a negative number, then percent
is treated as 0. If percent
is NULL, then 0 rows are returned.
If you do not specify rowcount
or percent
PERCENT
, then 1 row is returned.
ROW | ROWS These keywords can be used interchangeably and are provided for semantic clarity.
ONLY | WITH TIES Specify ONLY
to return exactly the specified number of rows or percentage of rows.
Specify WITH
TIES
to return additional rows with the same sort key as the last row fetched. If you specify WITH
TIES
, then you must specify theorder_by_clause
. If you do not specify the order_by_clause
, then no additional rows will be returned.
3、查询练习
例如:select * from help;
共有938行记录
1:获得前N条记录的语句
语法: fetch first N rows only;
例如:select * from help fetch first 5 rows only;
2:获得第N条开始后的M条的语句
语法:offset N rows fetch next M rows only;
例如:select * from help offset 3 rows fetch next 2 rows only;
3:获得前百分比N的语句
语法: fetch first N percent rows only;
例如:select * from help fetch first 1 percent rows only;
- ORALCE12C——分页 体验
- 深入体验JavaWeb开发内幕——打包自定义标签库及自定义分页标签
- Oralce12c新特性CDB与PDB
- Hibernate+Webwork2分页初体验
- C#-—体验字段
- C#-—体验接口
- C#-—体验结构
- C#-—体验枚举
- C#-—体验委托
- C#-—体验泛型栈
- 体验复杂度—汉诺塔
- mysql分页插件pagehelper初体验(详细)
- Jpage分页——hibernate分页
- jsp分页页面——数字分页
- ASP.NET真假分页—假分页
- ASP.NET真假分页—真分页
- ASP.NET真假分页—假分页
- ASP.NET真假分页—真分页
- 2015 whu校赛f题big data(dp + 小技巧)
- word 中如何添加图片和表格目录或链接的问题
- 到香港抽血验性别需要多少钱
- 到香港7周验性别要多少费用
- 香港鉴定胎儿性别要多少费用
- ORALCE12C——分页 体验
- 香港7周抽血查性别要多少钱
- 香港DNA抽血性别鉴定检测
- 亲子鉴定可以知道胎儿性别吗
- 8周如何预约赴香港测验性别
- 香港哪里可以验血测胎儿性别
- 香港深圳抽血查胎儿性别鉴定
- 去香港辨别性别具体手续流程
- 香港抽血鉴定性别要多少费用