Migrating database – how to continue an auto-incremented column? via /r/learnprogramming


Migrating database – how to continue an auto-incremented column?

I'm rebuilding an application from COBOL to Java.

This involves migrating the old DB2 database into the new Oracle database. The old COBOL app is still being used in production, so I will have to migrate the most updated table when the time comes.

The problem I ran into is this: the primary key is an auto-incrementing number. So when I add a new row, I want this number to auto-increment starting from the last number. I know how to make auto-increment from scratch, but not quite sure what the best approach here is.

Submitted July 17, 2017 at 10:43AM by unix_in_20_years
via reddit http://ift.tt/2txtO9Y

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s