leora leora - 1 year ago 55
SQL Question

What is the sql to change the field length of a table column in sql server

what is the SQL to make a field go from nvarchar(50) to nvarchar(250) ?? when i try to change it through the SQL server mgmt studio, it doesn't allow me to do it so i figured i would try SQL directly instead of using the GUI.

Answer Source
Alter table tblname ALTER Column colname nvarchar(250) [NOT] NULL

If NULL / NOT NULL is not specified the column will become Nullable irrespective of what ever the original specification was.