• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

alter a table

I have a table with    col1 int identity
                       col2  nvarchar(500)

How can I programmatically alter the table from int identity to int, and also from int to int identity.
I do not want to use enterprise manager.
Thanks for your response.
0
nesifa
Asked:
nesifa
1 Solution
 
skhorshidCommented:
pass the following SQL
--to create a table
create table ##test (id int identity)

--to remove identity from a column
alter table ##test alter column id int

i dont think you can make a column identity after the table is created
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now