-
VARCHAR to NVARCHAR
So I have an existing table that looks like:
Code:
ID BIGINT
VAL VARCHAR(128)
I am converting this table to something that will be multi language compliant. My question is, I know that NVARCHAR's take double the space of a VARCHAR. Do I actually need to double the length of the VAL field to store the same amount of data or does the DB handle that?
Basically I want to store a 128 character NVARCHAR.. do I need to set my table up like this:
Code:
ID BIGINT
VAL NVARCHAR(256)
or
Code:
ID BIGINT
VAL NVARCHAR(128)
-
Re: VARCHAR to NVARCHAR
For string datatypes the length is the number of characters that the field can contain - not the number of bytes required to store/use the data.
use NVARCHAR(128)
-
Re: VARCHAR to NVARCHAR