Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Limiting returned data from SQL Select Satement
On Tue, 17 Feb 1998 11:16:47 -0600, AMARENDRA B NETTEM
<nettama_at_charlie.cns.iit.edu> wrote:
>
>
>Matthew Chappee 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
>
> Hi,
>Use ROWNUM pseudo column to limit the no. of rows returning.
>
>SELECT * FROM TABLE_NAME
>WHERE ROWNUM <11;
>
Just as a note/warning, ORDER BY and GROUP BY will cause unexpected results when using ROWNUM
>Hope This Helps
>
>AMARENDRA
>Oracle DBA
>
>--
>*****************************************************************
>AMARENDRA B NETTEM
>Oracle Certified DBA (OCP)
-- -- Keith Moore President KMA Computer Solutions, Inc. -- /*----C/C++--Java--VB--Pro*C--SQL--OCI--Java--Delphi--ODBC--COBOL-----* * When the project must be saved at all costs: * * KMA Computer Solutions, Inc. Project Troubleshooting/Recovery * *---------Linux---AIX---HPUX---SYSV---Novell---NT---OS/2---'95-------*/Received on Wed Feb 18 1998 - 00:00:00 CST
![]() |
![]() |