TenVolt
                          Tech Notes
SQL Server > Changing the length (size) of an existing field articles:

 • Changing the maximum length or size of an existing field without losing data

Return to index of articles

Changing the maximum length or size of an existing field without losing data

Category: SQL Server
Category: Changing the length (size) of an existing field

ALTER TABLE tablename ALTER COLUMN columnname datatype(length)

May not work if you change the data type but works if you keep it the same as the existing data type (e.g. if the field is already a varchar, leave it varchar just increase the maxlength).

1/11/2004

Source: Visit

 TuneVault
 Music & MP3's
 10v Calendar
 Online & Easy
 Craigger
 Various & Misc.
 RetroVault
 Toys Toys Toys!
   

All contents ©2003 Ten Volt Consulting. All rights reserved.
Unauthorized duplication or use is a violation of applicable laws.
Webmaster Contact