Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove IDENTITY programaticly?
Message
From
23/08/2005 09:51:37
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01042858
Message ID:
01042892
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>Is there any chance to remove IDENTITY of the column definition programaticly?
>I checked BOL but there is no such an option in ALTER TABLE.
>I tryed ALTER TABLE MyTable ALTER COLUMN ... Int w/o any success.

This not require a table copy:
ALTER TABLE MyTable ADD dummy INT
UPDATE MyTable SET dummy = idcolumn
ALTER TABLE MyTable DROP column idcolumn
EXEC sp_rename 'MyTable', 'idcolumn', 'COLUMN'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform