Change the name of the column

  • Hello !!

    Is it possible to change the name of a column by the statement ALTER TABLE in the Query Analyzer ?

    Thanks

    Flavio

  • You should use sp_rename for this case.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Frank, thank you very much!

    Bye bye

    Flavio

  • Hi Flavio,

    Just in case you forget, please please check that there are no stored proc referencing this column before making the changes. If there is, you have to take this change into account.

    Bye

    Herb

  • Yes, Herb

    Before to change the name of the column, I cheked (and modified) all the stored procedures referencing this column

    Thank you veru much!

    Bye bye

    Flavio

Viewing 5 posts - 1 through 4 (of 4 total)

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