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: How can I cut off a query after 3 lines?

RE: How can I cut off a query after 3 lines?

From: <Sunil_Nookala_at_Dell.com>
Date: Fri, 04 May 2001 12:38:25 -0700
Message-ID: <F001.002F9B73.20010504105047@fatcity.com>

where rownum <4

Sunil Nookala
Dell corp
Austin, TX

-----Original Message-----
Sent: Friday, May 04, 2001 12:26 PM
To: Multiple recipients of list ORACLE-L

Q: how can you specify with a select statement how many rows are given as a result? I would only like to get the first three lines.....

here is what I have....

1 SELECT machine_name, login, Count(login) AS CountOfLogin FROM login_history
  2 group by machine_name, login
  3* order by count(login) desc
  4 ;

MACHINE_NAME LOGIN COUNTOFLOGIN

---------------- ---------- ------------
mocha            Jeff                  3
reeses           Paul                  3
spice            Tamara                3
mocha            Rudy                  2
reeses           Jeff                  1
reeses           Ravie                 1
reeses           Tonya                 1
spice            Rudy                  1

--

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

Author: MKirk
  INET: mkirk_at_hot.ee

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).
--

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

Author:
  INET: Sunil_Nookala_at_Dell.com
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 Fri May 04 2001 - 14:38:25 CDT

Original text of this message

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