Skip to Main Content

LiveLabs & Workshops

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Feature request: convert existing column to identity column

Pojen HuangJun 21 2022

At the time of writing, there is no easy way to convert PK column with data to identity column. The current approach is to add another column as identity, update new identity column value to existing PK and rename columns. (optionally drop old PK column)

Given adding new identity column and update takes time, and seems to be redundant work. (identity column is first populated with dummy value and then overwrite with existing PK value.)
We would like to see if there is a way to convert existing PK to identity column.
(we have dbms_redefinition to reduce conversation time, but it is not feasible especially we are currently using schema consolidation and each each schema have 2k tables. <- each instance has about 300 schema, and each schema have 2k table and we have 100 such databases...)

Comments
Post Details
Added on Jun 21 2022
0 comments
256 views