autoincrement column in SQL database

你。 提交于 2020-01-06 19:52:22

问题


I have two value in one table in database which I need to autoincrement. First value is ID it's a primary kay and it is setup as Identity Column and have (Is Identity) - Yes in properties. And how setup my second value (number) to autoincrement. When I setup his property (Is Identity) yes it automaticly change Identity Column for number.

Is possible to meke autoincrement for two value in one table in sql?


回答1:


It is not possible to have more than one identity column in a table (and I can't think of a valid reason for wanting to do so anyhow).



来源:https://stackoverflow.com/questions/8717544/autoincrement-column-in-sql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!