ROWNUM 返回当前行号

语法

rownum

功能

返回当前行号

参数

返回值

数值型

示例

建立环境:

create table t_week (xqn number(1,0));
insert into t_week (xqn) values(1);
insert into t_week (xqn) values(2);
insert into t_week (xqn) values(3);
insert into t_week (xqn) values(4);
insert into t_week (xqn) values(5);
insert into t_week (xqn) values(6);
insert into t_week (xqn) values(7);
commit;

查询结果:

SQL> select rownum, xqn  from t_week;

    ROWNUM        XQN
---------- ----------
         1          1
         2          2
         3          3
         4          4
         5          5
         6          6
         7          7

已选择7行。
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号