Unna
04-02-2001, 12:26 PM
I try to select query an output that will limit the number or records returned, such as 10, how do I make such query?
|
Click to See Complete Forum and Search --> : How to make a limit on query return? Unna 04-02-2001, 12:26 PM I try to select query an output that will limit the number or records returned, such as 10, how do I make such query? Oracledba8 04-02-2001, 12:58 PM Just at the End add Where Rownum <= 10 Hope it will work. Thanks Unna 04-02-2001, 01:04 PM Thanks, it works! JGolightly 04-03-2001, 10:34 AM 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. dbasupport.com
Copyright Internet.com Inc. All Rights Reserved. |