Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic management
Message
From
30/05/2012 06:35:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01544563
Message ID:
01544748
Views:
28
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform