|
Re: select second 25 records from a table [message #73898 is a reply to message #73891] |
Sun, 01 August 2004 11:02 |
ilver
Messages: 50 Registered: January 2004
|
Member |
|
|
If "the second 25 records" means record number 26 - 51
of some table.
I think you need to take advantages of some PL/SQL code.
I.e. declare a cursor and loop using a counter.
Remember rownum is a physical identifier. It's fast but hasen't anything to do whith the update history.
/ilver
|
|
|
Re: select second 25 records from a table [message #73935 is a reply to message #73898] |
Thu, 05 August 2004 01:05 |
Andy McGhie
Messages: 7 Registered: July 2004
|
Junior Member |
|
|
Ilver,
You could try:
SELECT *
FROM ( SELECT rownum AS order
, *
FROM tablename
ORDER BY rownum )
WHERE order > 25
AND order <= 50
But this would be a highly inefficient way to do it as you'd effectively be selecting the entire record set in an inline view and then selecting a potentially very small subset out of this.
Andy
|
|
|