Home » SQL & PL/SQL » SQL & PL/SQL » selecting only a specified portion of a select
selecting only a specified portion of a select [message #18732] Tue, 12 February 2002 18:07 Go to next message
Vijay
Messages: 116
Registered: September 1999
Senior Member
Is there any way to write a query like this

select a,b,c from tabA where a='x' and rownum between 10 and 30

Basically i want to select only a spcified number of rows giving a where condition and the specified rows I want.

Any info will be very benificial
Re: selecting only a specified portion of a select [message #18735 is a reply to message #18732] Tue, 12 February 2002 20:08 Go to previous message
Somu
Messages: 24
Registered: February 2000
Junior Member
hi,

you can try the following query.

select col1, col2, col3 from tab1 where rownum < 31
minus
select col1, col2, col3 from tab1 where rownum < 11

this will return the 10-20 records.
Previous Topic: One URGENT question about SQL
Next Topic: Overloading system stored procedures
Goto Forum:
  


Current Time: Thu Apr 25 19:54:58 CDT 2024