Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic management
Message
De
30/05/2012 06:35:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01544563
Message ID:
01544748
Vues:
30
>>>SSMS is generic tool and as such it quite often unnecessarily works the way you describe instead of just using ALTER TABLE. It could be quite expensive on big tables.
>>
>>In some cases the SQL itself doesn't allow some column changes - for instance, making a column not null when it was nullable and may contain nulls in some rows, if the column doesn't have a default. One solution is to create a default, apply it to all rows where there's a null in the field, then make the field not nullable.
>>
>>There may be other cases when altering a column is simply forbidden by SQL engine, and then creating a temp table, inserting from old, dropping old and then renaming new to old is the only way. SSMS, Toad and maybe other generic tools out there will just generate a script to do that.
>
>What is your point?

That sometimes this roundabout way IS necessary.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform