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 -> Selecting Top n records

Selecting Top n records

From: ed <tinman_x_at_hotmail.com>
Date: Tue, 29 Feb 2000 16:23:23 +0800
Message-ID: <38bb8f83$0$30568@motown.iinet.net.au>


Hey all,
  Just a very quick one. We are new to Oracle, we till recently used SQL server exlcusively. We are trying to do select only the top one record for a given recordset. Eg. Select top 1 <field> from <Table>. We use this primarily for checking the existence of records, but do also use it for other reasons.

We have found that we may be able to have a where clause something like "where rownum=1" which may do what I am after. From what I see this is will do the job, but I want to make sure that this is the best way before modifying the whole project.

Any feedback???
  Thanks,
    Ed. Received on Tue Feb 29 2000 - 02:23:23 CST

Original text of this message

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