Tuesday, October 29, 2013

Oracle Equivalent of MySQL's LIMIT (Or how to page results in Oracle)

I'm really just posting this for my own benefit but if you're reading this and it has been helpful, drop me a comment to let me know.
SELECT
  *
FROM (
  SELECT 
    a.*,
    ROW_NUMBER() OVER (ORDER BY column_to_sort) rn
  FROM
    my_table a
  WHERE
    my_column_to_filter = 'my_value_to_filter'
 )
WHERE
  rn >= my_starting_row AND rn <= my_ending_row

4 comments:

Unknown said...

Thanks for your informative post on Java application development. This open source platform assists software developers to create stunning mobile application with ease. Further, they can make use of this platform at free of cost.
Java Training in Chennai

Unknown said...

Excellent article!!! LoadRunner is popular automation testing tool used for validating a software application/system under load. It delivers most precise information about the performance, functionality and behavior of the software product. Loadrunner Training in Chennai | Loadrunner training Chennai

Mehgna Sharma said...
This comment has been removed by the author.
Mehgna Sharma said...

Thanks for your informative post on Java application development
Web Designing training in noida | SAS Summer Training in Noida | Java Training in Noida

Post a Comment

 
Blogger Templates