locked
Why I am not able to alter existing tables? RRS feed

  • Question

  • question? 

    Why am i not able to alter the tables? I even disabled the option of "Prevent Saving changes........" 

    Someone please help..

    Sunday, June 23, 2013 7:43 PM

Answers

  • Why am i not able to alter the tables? I even disabled the option of "Prevent Saving changes........" 

    The "Script Table as-->ALTER To" option does not apply to tables.  It applies to object like stored procedures and functions where the entire definition can be replaced at once. 

    To add/change/remove columns, you can either use the designer or use T-SQL.

     


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Proposed as answer by Sofiya Li Monday, June 24, 2013 9:08 AM
    • Marked as answer by Gru's Minion Monday, June 24, 2013 10:21 AM
    Sunday, June 23, 2013 8:04 PM
    Answerer

All replies

  • Why am i not able to alter the tables? I even disabled the option of "Prevent Saving changes........" 

    The "Script Table as-->ALTER To" option does not apply to tables.  It applies to object like stored procedures and functions where the entire definition can be replaced at once. 

    To add/change/remove columns, you can either use the designer or use T-SQL.

     


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Proposed as answer by Sofiya Li Monday, June 24, 2013 9:08 AM
    • Marked as answer by Gru's Minion Monday, June 24, 2013 10:21 AM
    Sunday, June 23, 2013 8:04 PM
    Answerer
  • In addition,you can script out the objects (like a table) along with all indexes defined on...

    Right click on the database -> Tasks->Generate Scripts.. Then after choosing the table click on Advanced Tab to enable the below option..

     

    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance

    Monday, June 24, 2013 5:26 AM
  • Why am i not able to alter the tables? I even disabled the option of "Prevent Saving changes........" 
    Someone please help..

    For tables, you need to Right Click -> Design.

    - Vishal

    SqlAndMe.com

    Monday, June 24, 2013 8:14 AM