SP to alter table

  • Can i create a store proc where it does 44 alter column commands and add column cmd. As i had bad expreince running all alter column commands at once, I want to do it through SP where it runs each alter cmd, once finished run next alter cmd.

    is this possible? may be with CTE or anything else.

  • Yes, you can do this. However, you may need to separate the individual commands into separate batches by using Dynamic SQL invocations.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply