Hi,
I made a table with a primary key,and all
the columns i declared char got converted into
varchar.
plz someone throw a light on it as i had seen somewhere
that using primary key increase search speed and using varchars
decrease so im in confusion. :(

http://www.mysql.com/doc/en/Silent_column_changes.html:


6.5.3.1 Silent Column Specification Changes

In some cases, MySQL silently changes a column specification from that given in a CREATE TABLE statement. (This may also occur with ALTER TABLE.): VARCHAR columns with a length less than four are changed to CHAR. If any column in a table has a variable length, the entire row is variable-length as a result. Therefore, if a table contains any variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns longer than three characters are changed to VARCHAR columns. This doesn't affect how you use the columns in any way; in MySQL, VARCHAR is just a different way to store characters. MySQL performs this conversion because it saves space and makes table operations faster. See section 7 MySQL Table Types.

Leander


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to