Difference Between varchar and nvarchar datatype?

Answers were Sorted based on User's Feedback



Difference Between varchar and nvarchar datatype?..

Answer / muhammadrashidmughal

The difference in varchar and nvarchar datatypes is
simple. Nvarchar stores UNICODE data. If you have
requirements to store UNICODE or multilingual data,
nvarchar is your choice. Varchar stores ASCII data and
should be your data type of choice for normal use

Is This Answer Correct ?    37 Yes 7 No

Difference Between varchar and nvarchar datatype?..

Answer / p.pradeepa

Varchar2(s) is used to define a variable length character
of maximum size s.

Nvarchar2: Same as VARCHAR2 except that the column stores
values in the National CS ie you can store values in Bangla
if your National CS is BN8BSCII .If the National CS is of
fixed width CS (all characters are represented by a fixed
byte say 2 bytes for JA16EUCFIXED) then NVARCHAR2(30)
stores 30 Characters.

If the National CS is of variable width CS (some characters
are represented by 1 byte some by 2 bytes as in UTF8 ) then
NVARCHAR2(30) stores 30 bytes.
The maximum column size allowed is 4000 bytes.
Ex: CREATE TABLE tab1 (col1 NVARCHAR2(2000)); will create a
table with one NVARCHAR2 column of 2000 characters in
length (stored as 4000 bytes because each character takes
two bytes) using JA16EUCFIXED as the national character
set:

Is This Answer Correct ?    5 Yes 3 No

Difference Between varchar and nvarchar datatype?..

Answer / munnabhaibcs

nvarchar means Your National Language data(font)

Is This Answer Correct ?    6 Yes 15 No

Post New Answer

More SQL Server Interview Questions

What is replace and stuff function in sql server?

0 Answers  


Explain few examples of RDBMS?

0 Answers   Wipro,


What are the advantages of using a stored procedure?

0 Answers  


What is normalization and its types?

0 Answers  


What is a transaction and what are ACID properties?

3 Answers  






What are transactions and its controls?

0 Answers  


Can you give an example of Stored Procedure?

4 Answers   Wipro,


How to fetch the next row from a cursor with a "fetch" statement?

0 Answers  


What are the new features in sql server 2016?

0 Answers  


What is row_number function?

0 Answers  


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

0 Answers   MCN Solutions,


What does it mean to be in union?

0 Answers  


Categories