Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove IDENTITY programaticly?
Message
De
23/08/2005 09:51:37
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01042858
Message ID:
01042892
Vues:
17
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'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform