TechnoLearnAcademy

TECHNOLEARN

SQL MODIFY/CHANGE COLUMN DATA TYPE

The ALTER TABLE Statement is used to modify the column data type.

Syntax:      

                   ALTER TABLE  table_name 
                   ALTER COLUMN column_name datatype ;

Example:

   Objective: In this example, we will change/modify the datatype of dept column from varchar to nvarchar. 
                    ALTER TABLE Tbl_Emp
                    ALTER COLUMN Dept nvarchar(20);
Scroll to Top