Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove IDENTITY programaticly?
Message
 
À
23/08/2005 09:51:37
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01042858
Message ID:
01042893
Vues:
22
>>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'
>
Thanks Fabio,
But this table has some Constrains based on that field, so I generated the script and execute it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform