-
retrive first n rows in a query
In postgres to retrive first n rows we'll use the key word limit. In Oracle how this is possible.
For example in postgres,
select * from emp limit 10 /* retrives first 10 rows of emp */
In oracle this is possible by rownum
select * from emp where rownum <=10.
Is there any other way of doing it.
-
rownum works fine. Otherwise you will have to write a complex query.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|