Varchar vs. Nvarchar String Data Types

The following table describes the supported functionality of varchar and nvarchar data types

Varchar

Nvarchar

Description

character ascii string

character multi language string

Maximum size (not null)

n bytes

4*n bytes

Join key column

yes

no

Group by column

yes

no

Distinct

yes

no

Order by column

yes

yes

Case

yes

yes

lower

yes

yes

upper

yes

yes

len

yes

yes

char_length

yes

yes

octet_length

yes

yes

like

yes

yes

rlike

yes

no

isprefixof

yes

no

regexp_count

yes

no

regexp_instr

yes

no

regexp_substr

yes

no

substring

yes

yes

charindex

yes

yes

patindex

yes

no

ltrim

yes

no

rtrim

yes

no

concatenation (||)

yes

yes

reverse

yes

yes

left

no

yes

right

no

yes

utf8_to_ascii

no

yes

  • 134
  • 17-May-2017
  • 823 Views