Varchar vs char vs nvarchar vs nchar

logo-db-300x300CHAR is fixed length.
VARCHAR is a varying length.

Typically I would recommend you use VARCHAR all the time, unless you have a short (< 5 char) field and you are 100% sure it is a set size.

The “N” at the beginning signifies a double byte character to store Unicode data. Use that if you need to handle multiple languages, or languages with double byte characters like Chinese.

Advertisements

One thought on “Varchar vs char vs nvarchar vs nchar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s