Reputation: 95
I have fixed length data in MYSQL Database.
So my question is that which data type among the VARCHAR and CHAR is more suitable to be used with respect to performance, Space, Time and speed?
Upvotes: 0
Views: 128
Reputation: 347
since you have data is of fixed length you should use the CHAR.
For example:
The following statement creates a table with a CHAR column having the fixed length. i.e. CHAR(3) fixed length is 3.
CREATE TABLE mysql_char_test ( status CHAR(3) );
Upvotes: 1