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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: help how get the n top rows for any table?

Re: help how get the n top rows for any table?

From: Breno A. K. Magnago <breno_at_mercantilsoares.com.br>
Date: Tue, 10 Jul 2001 11:13:43 -0700
Message-ID: <F001.00346093.20010710105529@fatcity.com>

Alexander,

Tuesday, July 10, 2001, 1:45:51 PM, you wrote:

AO> Hi, gurus!!!

AO> A need know how get n top row for any table somebody can help me!!

AO> Thanks!!!

AO> @lex
AO> ------------------------------------------------------------
AO>   Lic. Alexander Ordóñez Arroyo 
AO>   Caja Costarricense del Seguro Social                             
AO>   Soporte Técnico - División de Informática                     
AO>   Telefono: 295-2004, San José, Costa Rica                    
AO>   Aordonez_at_ccss.sa.cr

AO> ------------------------------------------------------------
AO> UNIX is very user friendly,
AO> It's just very particular about who it makes friends with.

Example with ROWNUM :

SELECT COD
FROM DETAIL
WHERE ROWNUM < 5
ORDER BY COD DESC This script gets 4 tops rows

--

Breno A. K. Magnago                            mailto:breno_at_mercantilsoares.com.br
Mercantil de Alimentos Soares

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Breno A. K. Magnago
  INET: breno_at_mercantilsoares.com.br

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jul 10 2001 - 13:13:43 CDT

Original text of this message

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