Personal tools
You are here: Home DB2 How To's How to alter an identity column as generated by default to generated always
Navigation
Log in


Forgot your password?
 
Document Actions

How to alter an identity column as generated by default to generated always


1 - First Step


Drop the propriety identity

db2 alter table <table_name> alter column <column_name> drop identity

2 - Second step


Create the propriety identity again, now as generated always

db2 alter table <table_name> alter column <column_name> set generated always as identity (start with <max(column_identity_name)>)

Example:
db2 "alter table identity alter column col3 set generated always as identity (start with 116)"
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls