Unanswered: Identity Column (Auto INcrement by 1)...does it need a constraint???
I am building a new database of 34 tables. All tables are going to have the primary key as an identity column that auto-increments by one. Is there any need for me to specifically set a constraint on the tables saying that this identity column must be unique? It seems redundant.
I ask because DB2 will let me do it, but it seems redundant and unnecessary. Anyone have an opinion? Sorry if this is basic...I am relatively new a DB design.
When you specify a primary key, it automatically creates a unique index on the column(s), unless you already created one yourself (if you created the index first and then later altered the table to create the primary key).