---
title: "What is the difference between char, nchar, varchar, and nvarchar in MS SQL Server?"  
description: "What is the difference between char, nchar, varchar, and nvarchar in MS SQL Server?"  
author: "Revati S Misra"  
published: 2023-07-11  
updated: 2023-07-12  
canonical: https://www.mindstick.com/forum/159038/what-is-the-difference-between-char-nchar-varchar-and-nvarchar-in-ms-sql-server  
category: "mssql server"  
tags: ["mssql server", "sql server", "sql"]  
reading_time: 2 minutes  

---

# What is the difference between char, nchar, varchar, and nvarchar in MS SQL Server?

What is the [difference between char](https://www.mindstick.com/interview/34500/difference-between-char-vs-varchar), nchar, [varchar](https://www.mindstick.com/forum/161878/what-is-the-difference-between-nvarchar-and-varchar), and nvarchar in MS [SQL Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server)?

## Replies

### Reply by Aryan Kumar

The main [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between CHAR, NCHAR, VARCHAR, and NVARCHAR in [MS SQL](https://answers.mindstick.com/qa/96619/what-are-the-advantages-of-ms-access-over-ms-sql-server) [Server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over) is the way they store data.

- **CHAR** and **NCHAR** are fixed-length data types, which means that they always reserve the same amount of space, regardless of the length of the data they store. For example, a CHAR(10) column will always reserve 10 bytes of space, even if the data stored in the column is only 1 byte long.
- **VARCHAR** and **NVARCHAR** are variable-length data types, which means that they only reserve the space needed to store the data they store. For example, a VARCHAR(10) column will only reserve 1 byte of space if the data stored in the column is only 1 byte long.

Another difference between CHAR, NCHAR, VARCHAR, and NVARCHAR is the type of data they can store. CHAR and NCHAR can only store single-byte characters, while VARCHAR and NVARCHAR can store multi-byte characters.

Here is a table that summarizes the differences between CHAR, NCHAR, VARCHAR, and NVARCHAR in MS SQL Server:

| Data type | Fixed-length | Variable-length | Single-byte | Multi-byte |
| --- | --- | --- | --- | --- |
| CHAR | Yes | No | Yes | No |
| NCHAR | Yes | No | Yes | Yes |
| VARCHAR | No | Yes | Yes | No |
| NVARCHAR | No | Yes | Yes | Yes |

In general, CHAR and NCHAR are more efficient than VARCHAR and NVARCHAR, because they do not need to store the length of the data. However, CHAR and NCHAR can be less flexible, because they cannot store multi-byte characters.

The best data type to use depends on your specific needs. If you need to store single-byte characters and you need to be as efficient as possible, then you should use CHAR or NCHAR. If you need to store multi-byte characters or you need more flexibility, then you should use VARCHAR or NVARCHAR.


---

Original Source: https://www.mindstick.com/forum/159038/what-is-the-difference-between-char-nchar-varchar-and-nvarchar-in-ms-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
