rowid [message #374779] |
Sun, 01 July 2001 08:33 |
puru
Messages: 1 Registered: July 2001
|
Junior Member |
|
|
hai all,
can i use order by clause while select ing the rowid.
example:
select rowid,<columname> from
order by rowid;
can i use order by clause while selecting the rowid.
because largle table (example 200,000 records).the rowid is different .in oracle 7.3.
the last record i.e 200,000 rowid is giving some thing.
at the same time i am selecting max(rowid) it is giving some other rowid.
pl kindly give me the sujection as soon as possible.
krishna moorthy purru
|
|
|
Re: rowid [message #374798 is a reply to message #374779] |
Tue, 03 July 2001 05:34 |
Kavitha
Messages: 40 Registered: December 1999
|
Member |
|
|
Hi,
Can you tell me why you want the data to be ordered by rowid? the rowid allocated will not be in the same sequence as data inserted. they ususally take up the next available rowid.
So, you might have to order by the data in the table and not by rowid to acheive the order you want.
HTH
Kavitha
|
|
|
Re: rowid [message #374799 is a reply to message #374779] |
Tue, 03 July 2001 05:59 |
Kavitha
Messages: 40 Registered: December 1999
|
Member |
|
|
Hi,
Can you tell me why you want the data to be ordered by rowid? the rowid allocated will not be in the same sequence as data inserted. they ususally take up the next available rowid.
So, you might have to order by the data in the table and not by rowid to acheive the order you want.
HTH
Kavitha
|
|
|
Re: rowid [message #374807 is a reply to message #374779] |
Tue, 03 July 2001 18:49 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
To answer your question, yes you can order by rowid and it will still work in Oracle 8i.
As Kavitha asks though - why would you want to. Rowid is not garanteed to follow the order in which the rows were inserted into different blocks in the table extents.
|
|
|