Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: selecting top performers

Re: selecting top performers

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 8 Aug 2005 14:10:53 -0700
Message-ID: <1123531784.981345.148180@f14g2000cwb.googlegroups.com>


And the correct way to really do this is forget the abomination ROWNUM and use a cursor, fetching rows until you have all that you need.

AFAIK, ther is no such thing as ROWNUM or ROWID in the SQL standard. So each time you use these you reduce your skill level by using this vendor specific pseudocolumns.

Why is ROWNUM bad? the key thing is that it is assigned BEFORE any sorting or ORDER BY clause. So you have to jump through hoops to get the middle 50 for example.

So just create a PL/SQL routine to get the answer for you. It's the right thing to do.

   Ed Received on Mon Aug 08 2005 - 16:10:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US