alter table modify column
snippet in sql

sql change column types

user2644

ALTER TABLE table_name
ALTER COLUMN column_name datatype;

-- Example
ALTER TABLE product
ALTER COLUMN description VARCHAR(250);

change data type in mysql

user2324

ALTER TABLE table_name

CHANGE COLUMN column_name column_name datatype; 

rename column sql

user7700

ALTER TABLE nom_table
RENAME COLUMN colonne_ancien_nom TO colonne_nouveau_nom

sql modify column

user2479

ALTER TABLE table_name
ALTER COLUMN column_name datatype;
--ex.
ALTER TABLE Customers
ADD Email varchar(255);

alter table modify column

user4296

-- ORACLE 18c
ALTER TABLE table_name 
MODIFY column_name datatype;

-- Example
ALTER TABLE product
MODIFY description VARCHAR2(500 char);

sql alter table

user740

-- With check if field already exists

IF NOT EXISTS(SELECT 1 FROM sys.columns 
          WHERE Name = N'Email'
          AND Object_ID = Object_ID(N'dbo.Customers'))
BEGIN    
	ALTER TABLE Customers
    ADD Email varchar(255);
END