This is described here:
http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html. The table is
created as a fixed table format.
-----Original Message-----
From: Emi Lu
To: mysql@stripped
Sent: 8/16/04 3:20 PM
Subject: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.
Hello all,
I have a questions about "varchar columns" change to "CHAR columns"
automatically.
When I designed a table t1
create table t1(id varchar(3) not null) in MySQL. After that, we use
"desc t1" to see the description of table "t1".
The result is the following:
===============================
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| id | char(3) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
I did not understand why the varchar(3) is changed to char(3)
automatically. While if we define a varchar(4) it will not change to
char(4) automatically. Could somebody help and explain that please?
Thanks a lot!
Emi Lu
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1