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

Home -> Community -> Mailing Lists -> Oracle-L -> How can I cut off a query after 3 lines?

How can I cut off a query after 3 lines?

From: MKirk <mkirk_at_hot.ee>
Date: Fri, 04 May 2001 10:11:03 -0700
Message-ID: <F001.002F99F8.20010504092544@fatcity.com>

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). Received on Fri May 04 2001 - 12:11:03 CDT

Original text of this message

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