• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

change nvarchar (50) field to (max)

how do i update the data type of a field in a production DB from nvarchar(50) to nvarchar(max)
when i try this in design view in sql 2005 i get a message that said the table needs to be dropped and re-created. this is not good.

any other options that will work on a production DB ?
0
supergirl2008
Asked:
supergirl2008
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
ALTER table tableName
alter column columnName nvarchar(max)
0
 
sameer2010Commented:
This worked for me..
create table c1(a nvarchar(50));
alter table c1 alter column a nvarchar(max);

Open in new window

0
 
supergirl2008Author Commented:
strange that i got the error that the table needs to be dropped and recreated, but the change was done on the table regardless.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now