Re: select rows 770000 until 770005 in a large table

From: John S. Fetzik <*REMOVE*jfetzik_at_sandc.com>
Date: Wed, 02 Feb 2000 10:05:49 -0600
Message-ID: <3rkg9so3m8jbo4q165ieqr7t8fd746mc2r_at_4ax.com>


Roland Schmidt <schmidtr_at_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_at_sandc.com Received on Wed Feb 02 2000 - 17:05:49 CET

Original text of this message