What is the difference between char() and varchar() in mysql | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

What is the difference between char() and varchar() in mysql

Size difference or speed difference between the two data types in SQL language

20th Jan 2018, 2:35 PM
Rakesh Patil
Rakesh Patil - avatar
2 Answers
+ 24
http://www.xpertdeveloper.com/2011/12/char-varchar-in-mysql/ /*in varchar , memory is released if value doesn't fit in characters specified... so it takes more time ... but less memory*/
20th Jan 2018, 2:43 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
0
Tipo String CHAR(M) - Cadena de texto de longitud pre-establecida. El tamaño es especificado entre paréntesis. Máximo 255 bytes. VARCHAR(M) - Cadena de texto de longitud variable. El tamaño máximo es especificado entre paréntesis. BLOB - "Grandes Objetos Binarios" y son utilizados para almacenar grandes cantidades de datos binarios, como imágenes u otro tipo de archivos. TEXT - Grandes cantidades de texto.
12th Apr 2018, 3:08 AM
Sebastián J. Tosco