1--The following example renames the column TerritoryID in the table Sales.SalesTerritory to TerrID in the AdventureWorks database.
2
3EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN';
1-- Oracle, MySQL 8+
2ALTER TABLE table_name RENAME COLUMN current_name TO new_name;
3-- MySQL < 8:
4ALTER TABLE table_name CHANGE current_name new_name datatype(length);
5-- SQL Server:
6EXEC SP_RENAME 'table_name.current_name' , 'new_name', 'COLUMN'
1ALTER TABLE `db_name`.`table_name`
2 CHANGE `current_column_name` `new_column_name` datatype(size) NOT NULL COMMENT '';