rename a column is MS SQL


/ Published in: SQL
Save to your folder(s)

Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.


Copy this code and paste it in your HTML
  1. EXEC sp_rename 'TABLENAME.OLD_COLUMNNAME', 'NEW_COLUMNAME', 'COLUMN';

URL: http://naspinski.net/post/Change-column-name-in-a-MSSQL-table.aspx

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.