Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Generating script for ALTER TABLE in SSMS 2005

Author  Topic 

srivatsahg
Yak Posting Veteran

71 Posts

Posted - 2009-08-05 : 10:13:23
Is there a way to have SQL Server Management Studio 2005 to generate the script to alter a table when changing the design of a table in the design wizard?

The option is disabled in the context menu item
Is there a switch to turn that on in SSMS 2005?


Regards
Srivatsa

srivatsahg
Yak Posting Veteran

71 Posts

Posted - 2009-08-05 : 10:32:37
Hello Forum

I figured this out by myself
All i did was ...

1. Open the desired table to "modify"

2. Make your changes (but don't save yet).
Select the column that changed --> Right click --> Generate Change Script.


I still wonder why do we have ALTER TABLE option (which is disabled anyway) in SSMS GUI
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-08-06 : 02:57:10
quote:
Originally posted by srivatsahg

Hello Forum

I figured this out by myself
All i did was ...

1. Open the desired table to "modify"

2. Make your changes (but don't save yet).
Select the column that changed --> Right click --> Generate Change Script.


I still wonder why do we have ALTER TABLE option (which is disabled anyway) in SSMS GUI


Becuase it doesn't know what the user is supposed to alter

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -