Differences between CHAR and VARCHAR : Char Varchar : Data Types MySQL TUTORIALS


MySQL TUTORIALS » Data Types » Char Varchar »

 

Differences between CHAR and VARCHAR


Value CHAR(4) Storage Required VARCHAR(4) Storage Required
'' ' ' 4 bytes '' 1 byte
'ab' 'ab ' 4 bytes 'ab' 3 bytes
'abcd' 'abcd' 4 bytes 'abcd' 5 bytes
'abcdefgh' 'abcd' 4 bytes 'abcd' 5 bytes





Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Data Types
» Char Varchar