you can guess the meaning of rownum with its name. rownum is row number of one line in table. it is a bit like mysql's limit. but rownum has a disadvantage, it is only get below scope of rownum, which set in sql. by say for example, select * from tab where rownum<10; you will got 9 records, which the first record to the 9th records in database. But you want to get records from 11th to 21th. the statement as below is incorrect: select * from tab where rownum between 11 to 21; You must create a nested query for your target, example as below: select * from (select rownum rn, * from tab where rownum<22) where rn>10;well, in php, you can use rownum create your next page. good luck.
请问存储过程是用pl/sql写的吗?
拜托高手指引一个方向,我自个儿去看书也不会迷路嘛。
rownum is row number of one line in table.
it is a bit like mysql's limit. but rownum has a disadvantage, it is only get below scope of rownum, which set in sql.
by say for example,
select * from tab where rownum<10;
you will got 9 records, which the first record to the 9th records in database. But you want to get records from 11th to 21th. the statement as below is incorrect:
select * from tab where rownum between 11 to 21;
You must create a nested query for your target, example as below:
select * from
(select rownum rn, * from tab where rownum<22)
where rn>10;well, in php, you can use rownum create your next page.
good luck.