APM: Last question (for today)

Jeff Sumner jeff_sumner at hotmail.com
Tue Oct 24 14:37:42 PDT 2006


Don't know if it is relevant to you, but I use Oracle and I've gotten burned by the limit a couple of times.If you write something like:select * from taxonomy where rownum < 10 order by tax_id You do not get the first 10 rows, but a seemingly random 10 rows.The first 10 requires a subquery, otherwise oracle sorts the rows after taking the first 10 rows, not before.select * from (select * from taxonomy order by tax_id ) where rownum < 10 > Date: Tue, 24 Oct 2006 16:22:32 -0500> To: austin at pm.org> From: CaptNemo at Austin.rr.com> Subject: Re: APM: Last question (for today)> > DOH, limit the SQL query.> > /me feels dumb.> > I was so caught up in the joy that my pages are working, I'm not thinking > straight.> > > > >Use your databases limit feature.  Often the word "LIMIT" followed by a> >number at the end of the statement.> >> >example:> >> >SELECT *> >   FROM dual> >  LIMIT 1;> > _______________________________________________> Austin mailing list> Austin at pm.org> http://mail.pm.org/mailman/listinfo/austin
_________________________________________________________________
Personalize your Live.com homepage with the news, weather, and photos you care about. Try it.
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/austin/attachments/20061024/571b775b/attachment.html 


More information about the Austin mailing list