- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between CHAR and NCHAR in MySQL?
Both CHAR and NCHAR are fixed length string data types. They have the following differences −
CHAR Data Type | NCHAR Data Type |
Its full name is CHARACTER. | Its full name is NATIONAL CHARACTER |
It uses ASCII character set | It uses Unicode character set and data is stored in UTF8 format |
It occupies 1-byte of space for each character. | It Occupies 2-bytes of space for each character |
mysql>create table hello1(name CHAR(20)); Query OK, 0 rows affected (0.15 | mysql>create table hello(name NCHAR(20)); Query OK, 0 rows affected (0.61 |
- Related Articles
- What is the difference between CHAR and VARCHAR in MySQL?
- What is the use of NCHAR in MySQL?
- Difference between char s[] and char *s in C
- Difference between const char* p, char * const p, and const char * const p in C
- Difference between string and char[] types in C++
- What is the difference between SQL and MySQL?
- In MySQL, what is the difference between SERIAL and AUTO_INCREMENT?
- What is the difference between int and integer in MySQL?
- What is the difference between BIT and TINYINT in MySQL?
- What is the difference between MySQL NOW() and SYSDATE()?
- What is the reverse function of CHAR() in MySQL
- What is the use of MySQL CHAR() function?
- In MySQL what is the difference between != NULL and IS NOT NULL?
- What is the difference between TINYINT(1) and Boolean in MySQL?
- What is the difference between MySQL stored procedure and function?

Advertisements