Feb 28, 2022
Sahariatul, I’m glad you enjoyed the article!
Basically, VARCHAR is like CHAR but without a fixed length. In the example in the article we’re filling names in the places that we initialized with VARCHAR. This makes sense because different names have different lengths.
In another entry, we used CHAR(1) because we want to fill it only with a string of length 1, either 'm'
, 'f'
or 'x'
.
I hope that makes it clear! Thanks for your interest, Sahariatul.