Update column name in sql

This article is tagged with: Update column name in sql and mysql

cmd to rename a collumn name in sql

ALTER TABLE table_name RENAME COLUMN old_name TO new_name;

sql rename column

EXEC SP_RENAME 'TABLE_NAME.OLD_COLUMN_NAME','NEW_COLUMN_NAME'

update column name in sql

ALTER TABLE table_name
ALTER COLUMN column_name datatype;

alter table name sql

-- Microsoft SQL style
EXEC sp_rename 'TableOldName', 'TableNewName';

modify column name in tsql

sp_rename 'table_name.old_column', 'new_name', 'COLUMN';

This article is tagged with: Update column name in sql and mysql