Skip to content Skip to sidebar Skip to footer

Changing The Datatype Of Table Column

A very simple MSSQL command is giving error. create table emp (empid char(6)); insert into emp values(3); ALTER TABLE emp MODIFY empid char(10); //The error line :@ Error >

Solution 1:

Change it to

ALTERTABLE emp ALTERCOLUMN empid char(10)

Have a look at

ALTER TABLE (Transact-SQL)

and search for ALTER COLUMN examples

Post a Comment for "Changing The Datatype Of Table Column"