Can a sql server table have two identity columns?

前端 未结 9 1865
孤城傲影
孤城傲影 2020-11-27 06:23

I need to have one column as the primary key and another to auto increment an order number field. Is this possible?

EDIT: I think I\'ll just use a composite number a

9条回答
  •  感动是毒
    2020-11-27 07:07

    Add one identity column and then add a computed column whose formula is the name of the identity column

    Now both will increment at the same time

提交回复
热议问题