

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- 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
- What is the difference between SQL and MySQL?
- What is the difference between MySQL NOW() and SYSDATE()?
- In MySQL, what is the difference between SERIAL and AUTO_INCREMENT?
- What is the difference between BIT and TINYINT in MySQL?
- What is the difference between int and integer in MySQL?
- Difference between string and char[] types in C++
- Difference between const char* p, char * const p, and const char * const p in C
- In MySQL what is the difference between != NULL and IS NOT NULL?
- What is the difference between MySQL INSTR() and FIND_IN_SET() functions?
- What is the difference between UNIX TIMESTAMPS and MySQL TIMESTAMPS?
- What is the difference between MySQL LOCATE() and FIND_IN_SET() functions?
- What is the difference between MySQL NOW() and CURDATE() function?
Advertisements