-
I try to select query an output that will limit the number or records returned, such as 10, how do I make such query?
-
Just at the End add
Where Rownum <= 10
Hope it will work.
Thanks
-
-
Be careful with this if you're using an order by clause.
e.g. select * from emp
where rownum <= 10
order by emp_no
will return the first 10 rows and then sort them by emp_no.
It will not sort the data before selecting 10 rows.
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
|
Click Here to Expand Forum to Full Width
|