How to rename a column name?

  • G'd afternoon!!!

    it may seems to be odd, but i had been looking for a way to rename a column name, i know i can create a column set its properties and copy the rows from one to other. It works if i know the column properties and if columns to rename are not so many.

    My question is: How can i change the column names of any given table(s) programatically? i'd been looking in the site with no luck. Please if you can help me i really will appreciate it.

    Regards

    Estuardo 

    Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
    Lao-t'ze.

  • EXEC sp_rename 'table.old_column','new_column'

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • Thank YOU!!!!!!   very much Derrick, i had been looking for this like crazy.... you made my weekend

    Deeply Thank you

    Estuardo

     

    Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
    Lao-t'ze.

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

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