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

Home -> Community -> Usenet -> c.d.o.server -> Re: Limiting returned data from SQL Select Satement

Re: Limiting returned data from SQL Select Satement

From: <kasti_at_hotmail.com>
Date: 1998/02/18
Message-ID: <6ceoju$829$1@nnrp1.dejanews.com>#1/1

In article <34e9ae7c.229970109_at_ntserv02>,   matthew_at_nospam.mattshouse.com wrote:
>
> Is there a way to limit the number of rows returned from an SQL Select
> statement? MS Access supported the following:
>
> Select Top 10 * from table_name
>
> I can't figure out the Oracle equivelant.
>
> Thanks,
>
> Matthew
>

You can use the ROWNUM pseudocolumn variable for this pupose .

The above query can be rewritten in Oracle like this,

SELECT * FROM emp
WHERE ROWNUM < 11

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed Feb 18 1998 - 00:00:00 CST

Original text of this message

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