开发者

Display Records through SQL in Oracle

I had run following query in Oracle Database开发者_Go百科 and produces following output:

Query: select id,name from member where name like 'A%';

 ID   Name
 261  A....
 706  Aaa.......
 327  Ab.....

 and more... 

This Query returns 50 records and

I want to display 10 records at a time to user.

Since, ID does not contain data in autoincrement fashion, i cannot use between operator.

and rownum operator also doesn't help much.

Kindly Help.

Regards,

Ankit Agarwal


 SELECT ID, Name 
 from (
       select id,name, ROW_NUMBER() over( order by name) r
       from member 
       where name like 'A%'
 )
 WHERE R between FromRowNum AND ToRowNum;


See http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:76812348057

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜