Subject How To Change Column DataType From Varchar To Integer ?
Author Vishal Tiwari
Hi All,

I have a Table called Table1, in that I have a column called Status which is of type Varchar and contains values link '1', '2', '3' etc, i.e. all integer values only but in Varchar type.

I need to change this column's datatype to Integer for some reason, any idea how do we do it ?

I am trying like:

ALTER TABLE Table1 ALTER STATUS TYPE Integer;

But I am getting an error like, "Cannot change datatype......."


Thanks In Advance.


With Best Regards.

Vishal