Kbase P151811: How to change the column width on the MS SQL Server
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/08/2009 |
|
Status: Unverified
GOAL:
How to change the column width on the MS SQL Server
GOAL:
How to increase the field width on the MS SQL Server
FACT(s) (Environment):
Windows
MS SQL Server
FIX:
The syntax are:
ALTER TABLE <table name
ALTER COLUMN <column name> <Data type>
go
Example:
ALTER TABLE tbl1
ALTER COLUMN fld1 VARCHAR(MAX)
go
On the above example, if the VARCHAR(10) is there for fild1 originally, it will alter the VARCHAR(10) to VARCHAR(MAX). VARCHAR(50) can also be specified if the column width needs to be expanded to 50 variable characters.