Start Free Trial
Changing from varchar to nvarchar
We are using MS SQL 2012R2. One of our tables has a field which is varchar(MAX), we are changing it to nvarchar(MAX) in order to allow non-latin characters to be entered.
We already tested and worked fine. My question is: For all the entries we already have in that varchar field, will they be affected in ANY way if we change the field to nvarchar?
Microsoft SQL Server
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
That is great news! Thank you.
As Brian says, No, but you'll take a minor performance hit.
nvarchar's take 2 bytes per character, so the table size on disk will increase, which could be a big deal if there are 1000's of characters (and page splits too) in the values and a bajillion rows.
(I've been told, haven't fully tested to verify this statement) When queries execute they need to pre-store the expected return set size, and nvarchar's will make that bigger, which could be a big hit if your return set is huge.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent