5/27/2023 0 Comments Alter table add column sql server![]() Only one identity column per table is allowed. Multiple identity columns specified for table ‘MyTable‘. If you try to have multiple identity column your table, it will give following error. A table can have only one identity column. If your table has already identity column and you can want to add another identity column for any reason – that is not possible. There is a workaround for the same which I have discussed in depth over the article Add or Remove Identity Property on Column. If your table already has a column which you want to convert to identity column, you can’t do that directly. If you are table does not have identity column, you can simply add the identity column by executing following script: ALTER TABLE MyTable Sometime the questions are very very simple but the answer is not easy to find. “How do I add an identity column to Table in SQL Server? “ ![]() Here is the question I received on SQLAuthority Fan Page.
0 Comments
Leave a Reply. |