How to rename a column using alter command

  • Hi,

    Can anyone help me to get the query to alter/rename the column name in sql without using the sp_rename proc.

    I tried some of the queries, but it didnt help me.

    Ex. alter table table1 Rename column perio to period;

    Thanks in advance,

    Regards,

    Rajendran.

  • There's no ALTER option to change a column name (see the spec for Alter Table in Books Online to see what options it has). To rename a column, you use sp_rename.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks

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

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