Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fetch first in Oracle

 
shell Johnson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one know how to do the following sql in Oracle?
select c1 from table1 order by c2 fetch first 1000 rows only
 
Jason Steele
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you need to do:

SELECT .... WHERE ROWNUM > 0 AND ROWNUM < 1000 ORDER BY c2

It's been a while since I used Oracle, but I believe that's it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic