How to alter the table column in SQL Server?

Introduction:

In this article i will explain how to alter table column data type in SQL Server.

Description:

In previous article i explained How to create a table in SQL Server. Now i will explain how to alter table column data type in SQL Server.

Basic Syntax:

alter table <table-name> 
alter column <column-name> <new-data-type>

Now we will update EmpName data type from varchar(20) to varchar(500).

alter table Employee
alter column EmpName varchar(500)