Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

I hail from Chennai and hold a Masters degree in Computer Applications. I am into IT for more than a decade now. Presently, I model the role of a Senior Project Manager with Verizon Data Services India Pvt. Ltd., I have been MVP in SQL Server (2006-08, 2012) & .NET (2003-04).
Browse by Tags · View All
SQL Server 4
SSMS 2
Alter to 1
Data length 1
Bad Practice 1
BIGINT 1

Archive · View All
July 2012 4

Vadivel's (We)blog

Script table as - ALTER TO is greyed out

Jul 11 2012 12:00AM by Vadivel   

One of my office colleague recently asked me why we are not able to generate ALTER Table script from SSMS. If we right click on the table and choose "Script Table As"  ALTER To option would be disabled or Greyed out. Is it a bug?


No it isn't a bug. ALTER To is there to be used for generating modified script of Stored Procedure, Functions, Views, Triggers etc., and NOT for Tables.

For generating ALTER Table script there is an work around. Right click on the table, choose "Modify" and enter into the design mode. Make what ever changes you want to make and WITHOUT saving it right click anywhere on the top half of the window (above Column properties) and choose "Generate Change Script".


Please be advised that SQL Server would actually create a new table with modifications, move the data from the old table into it and then drop the old table. Sounds simple but assume you have a very large table for which you want to do this! Then it would mean hell a lot of resource usage :)

Originally Posted here

Tags: SQL Server, Alter to, SSMS


Vadivel
474 · 0% · 79
10
 
0
Lifesaver
 
 
 
0
Incorrect



Submit

3  Comments  

  • Good one. :) This will be used in scenarios, where we supposed to send script to DBA.

    commented on Jul 11 2012 12:17PM
    Ramireddy
    2 · 41% · 12972
  • Thanks for your feedback Ramireddy.

    commented on Jul 11 2012 9:27PM
    Vadivel
    474 · 0% · 79
  • alt text

    Also Use Highlight button also.

    commented on Jul 11 2012 10:46PM
    Nirav Gandhi
    38 · 5% · 1503

Your Comment


Sign Up or Login to post a comment.

"Script table as - ALTER TO is greyed out" rated 5 out of 5 by 10 readers
Script table as - ALTER TO is greyed out , 5.0 out of 5 based on 10 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]