Wednesday, June 27, 2007

Resetting IBM DB2 identity column

How many of you use the database generated primary keys? I prefer to use it because it remove the hassle to manually generate and maintain sequence numbers manually. Even though the sequence number is generated by the db, it can still be changed via the following syntax.
alter table table_name alter column column_name restart with new_restart_number

No comments:

Post a Comment