Xref: alice comp.databases.oracle.tools:39446
Path: alice!news-feed.fnsi.net!netnews.com!feeder.qis.net!logbridge.uoregon.edu!pln-w!spln!extra.newsguy.com!newsp.newsguy.com!news2
From: John S. Fetzik <*REMOVE*jfetzik@sandc.com>
Newsgroups: comp.databases.oracle.tools
Subject: Re: select rows 770000 until 770005 in a large table
Date: Wed, 02 Feb 2000 10:05:49 -0600
Organization: http://extra.newsguy.com
Lines: 27
Message-ID: <3rkg9so3m8jbo4q165ieqr7t8fd746mc2r@4ax.com>
References: <3897FE06.543EFCE1@hager.de> <aChS0FA$FCm4EwqO@ahardy.demon.co.uk> <3898324C.55BC7565@hager.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: Forte Agent 1.7/32.534

Roland Schmidt <schmidtr@hager.de> wrote:

>
>I want to get the key.
>The reason is a problem during a Software upgrade (SAP).
>In our test system everything works well and in our production system the
>upgrade stopped with an error due to create the primary index after
>inserting 770005 rows.
>Now I try to find out why it works in one system and not in the other. I
>may help to get the key of row 770006, you know ?
>
>Roland


So what you want are the rows that were inserted 'last'? You MIGHT be
able to use ROWID. If you are lucky the rowid will have 'incremented'
for each row inserted and thus last row inserted will have the
'largest' rowid.

select rowid ID, TABLE.*, from TABLE order by ID DESC;

This would still return all the rows, but at least you could get them
in reverse order of the insert.


John S. Fetzik
*REMOVE*jfetzik@sandc.com
