In this blog I have described how to changed data type of existing column of table. For demonstration, I have used a table that given below.

CREATE TABLE [dbo].[EmpInfo]
(
[ID] INT IDENTITY PRIMARY KEY,
[Name] VARCHAR(50),
[Date] VARCHAR(50)
)


Syntax:

ALTER TABLE <Table Name> ALTER COLUMN <Column Name> <New Data Type> <Size Depend on Data Type>


Example:
ALTER TABLE [dbo].[EmpInfo]
ALTER COLUMN [DATE] DATETIME
  Modified On Sep-18-2014 01:24:07 PM

Leave Comment