Archive for March, 2010

Change Field Size in Existing Table (SQL Server, Transact SQL)

Posted by admin on March 25, 2010  |  No Comments

Note to self: Use the following syntax to change the size of an existing field in an existing table.

ALTER TABLE Changes_Perf_FormLayout
ALTER COLUMN SpecialID varchar(50)

Yes, a) there are slicker ways to do it, and b) there are management tools that can do all of this for you; but if you just need to “fix” the field size quickly in SQL Query Analyzer, then this will do the trick.