[Techtalk] How do I limit my oracle resultset to 100 rows
popcorn09 at gmail.com
Sun Nov 11 16:09:10 UTC 2007
On Nov 10, 2007 1:29 AM, Tricia Bowen <tricia.bowen at gmail.com> wrote:
> Thanks for the help.
> The rownum <=100 did the trick. I couln't get the 'limit' function to
> It gave me a "SQL Command not properly ended" error. I didn't check to see
> if it was available in Oracle 9i. Here is how I tried using it:
> SELECT * FROM contact c
> where c.name like 'A%'
> order by c.LAST_NAME
> limit 10
I am not sure about Oracle but in MySQL, we use
SELECT * FROM <<table>> limit 0,100;
> On Nov 9, 2007 1:06 PM, Kathryn Hogg <kjh at flyballdogs.com> wrote:
> > Tricia Bowen wrote:
> > > Help!
> > > I have a query that returns over 10,000 rows. It's a pretty sizable
> > query
> > > so
> > > it takes a while to run. How do I limit the number of rows returned to
> > > 100?
> > if its oracle 8i or newer, use the SQL standard by adding "row_number <=
> > 100" to your where clause.
> > if its an older version of oracle, replace row_number with rownum
> > --
> > Kathryn
> > http://womensfooty.com
> > _______________________________________________
> > Techtalk mailing list
> > Techtalk at linuxchix.org
> > http://mailman.linuxchix.org/mailman/listinfo/techtalk
> Techtalk mailing list
> Techtalk at linuxchix.org
More information about the Techtalk