Alex Rivera | Logout

Changing a data column from varchar(max) to nvarchar(max) in SQL Server 2008

Asked 2012-05-15T20:22:11.257
13

I have to change the data type in a SQL Server 2008 table from varchar(max) to nvarchar(max). This table has data in it. Is there a way to change the data type without losing the data?

Edit
Report

1 Answer

2

Always take a backup so no matter what happens you can go back to the way things were.

With that said changing from varchar(max) to nvarchar(max) should not lose data.

Side note: you might have concerns if you were changing in the other direction nvarchar(max) to varchar(max) as the process would have to convert extended characters if any were present.

answered 2012-05-15T20:31:53.797

Your Answer