• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pagination Query in Oracle

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In MySQL we use limit query
Like select * from mytable limit 1 3.

But in oracle how we can perform this type of query for pagination.

I googled and find the below query

select * from (select a.*, rownum my_limiter from emp2 a ) where my_limiter between 1 and 3

Is this good way to use this query for pagination.

Please help me.

 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pankaj semwal wrote:
In MySQL we use limit query
Like select * from mytable limit 1 3.

But in oracle how we can perform this type of query for pagination.

I googled and find the below query

select * from (select a.*, rownum my_limiter from emp2 a ) where my_limiter between 1 and 3

Is this good way to use this query for pagination.

Please help me.



Here is an example of another way using the all_objects view (sorry... I don't have your table in my schema). ;)



 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic