0

I am in the process of converting an entire, rather large database entity attributes, "The ones that need to be" over to NVARCHAR because our client will be offering services world wide.

This specific data base we've worked with and upgraded for years so it is rock solid for use of membership, location data, ect.

However, It is not quite clear to me as to if as to the following.

  1. I store a 8 length piece of data into VARCHAR(8)
  2. I convert this to NVARCHAR(8) and it will store a total of 8 length of Chinese data.
  3. If the NVARCHAR automatically is already set to 2 bytes to each one of my 1 bytes in VARCHAR(8) wouldn't that mean that NVARCHAR(8) is really storing 16 bytes of space and or has allocated 16 bytes for the NVARCHAR(8) so, is there any reason to change the length of the attributes in the entities when i change them for VARCHAR TO NVARCHAR?

Also, before I truly screw things up I've tried testing this by the following code but my Chinese data returns question marks and not the correct data. So this leads me to believe that I also need to set some setting on my database in order to even use NVARCHAR.

Code I am testing with

DECLARE  @NVARCHAR NVARCHAR(8) ='我们的名字说明了'; 
DECLARE  @VARCHAR  VARCHAR(8) = 'k little';

SELECT @NVARCHAR AS 'Chinese', @VARCHAR as 'English'

Returns ???? Query Result Set

Please advise me on my ignorance to this matter.

Thank you.

0 Answers0