Skip to main content

Rename Columns In SQL Server

To rename a column using Object Explorer

  1. In Object Explorer, connect to an instance of Database Engine.
  2. In Object Explorer, right-click the table in which you want to rename columns and choose Rename.
  3. Type a new column name.

To rename a column using Table Designer

  1. In Object Explorer, right-click the table to which you want to rename columns and choose Design.
  2. Under Column Name, select the name you want to change and type a new one.
  3. On the File menu, click Save table name.

To rename a column using T-SQL


EXEC sp_rename 'TableName.OldColumnName', 'NewColumnName', 'COLUMN';
EXEC sp_rename 'Sales.Employee.EployeeJobId', 'JobID', 'COLUMN';

Comments