alter table column name code example
Example 1: sql server alter column
ALTER TABLE table_name
ALTER COLUMN column_name new_data_type(size);
Example 2: change column name in sql
MySQL:
ALTER TABLE Customer CHANGE Address Addr char(50);
Oracle:
ALTER TABLE Customer RENAME COLUMN Address TO Addr;
Example 3: change column name sql
ALTER TABLE `db_name`.`table_name`
CHANGE `current_column_name` `new_column_name` datatype(size) NOT NULL COMMENT '';
Example 4: sql alter column name sql server
EXEC sp_RENAME 'table_name.oldColumn_name' , 'newColumn_name', 'COLUMN'
Example 5: change column name sql
ALTER TABLE users
ALTER COLUMN first username varchar(20);