Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help me to retrieve a specific number of rows in a sql query

Status
Not open for further replies.

ngcm

Programmer
Aug 23, 2000
1
0
0
US
I have got a big table which contain an important number of rows. i need to retrieve the first n rows or a number of rows betwween two values n and m. i try like that:
select * from my_table
where rownum<=n
but i got an error message because informix don't recognise rownum. it's very urgent for me to get a solution in the next days. if you know something about that, please help me.
 
Did you ever get an answer for this???

First 100 rows:

SELECT FIRST 100 * FROM orders
 
use the first keyword .

eg ,

select first 4 * from tab_name
where col between value1 and value2

Will select only the first 4 rows that match teh critieria you stipulate below .

Goodluck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top