Write different between CHAR and VARCHAR …

CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Balaram Tamili 4 years, 11 months ago
- 2 answers
Gaurav Seth 4 years, 11 months ago
|
CHAR Data Type |
VARCHAR Data Type |
| Its full name is CHARACTER | Its full name is VARIABLE CHARACTER |
| It stores values in fixed lengths and are padded with space characters to match the specified length | VARCHAR stores values in variable length along with 1-byte or 2-byte length prefix and are not padded with any characters |
| It can hold a maximum of 255 characters. | It can hold a maximum of 65,535 characters. |
| It uses static memory allocation. <pre> mysql>create table emp(name CHAR(20)); Query OK, 0 rows affected (0.25</pre> | It uses dynamic memory allocation. <pre> mysql>create table emp1(name VARCHAR(20)); Query OK, 0 rows affected (0.21</pre> |
Related Questions
Posted by Siya Vishwakarma 1 year, 8 months ago
- 1 answers
Posted by Arifa Meharun 1 year, 4 months ago
- 0 answers
Posted by Parth Chaudhary 1 year, 10 months ago
- 2 answers
Posted by Akib Chowdhury 1 year, 6 months ago
- 1 answers
Posted by Simran Batra 1 year, 6 months ago
- 0 answers
Posted by Prapti Dubey 1 year, 6 months ago
- 0 answers
Posted by Martina Sangchoju 1 year, 10 months ago
- 2 answers
Posted by Yashika Kakkar 1 year, 7 months ago
- 1 answers

myCBSEguide
Trusted by 1 Crore+ Students

Test Generator
Create papers online. It's FREE.

CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
myCBSEguide
Balaram Tamili 4 years, 11 months ago
0Thank You