Tuesday, November 22, 2011

Changing column datatype size in sql

I think all of know how to change column name and column data type  . But   the how to change the size of data type of particular row in table . Let me give an example here how to change the Column Data type size using sql ALTER Command .The given example will change the var char(10) to var char(100)

Syntax:
alter table TableName alter column ColumnName DataType(Size)
Example:
alter table Retails alter column Address varchar(100);

No comments:

Bel