Cassiano Prado Oliveira <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding 8bit, charset: iso-8859-1, 22 lines --] > > Why when i create a table like this: > CREATE TABLE `prmsnctabelas2` ( > `cdempresa` varchar(5) NOT NULL DEFAULT '', > `cdfilial` CHAR(2) NOT NULL DEFAULT '', > `nometabela` char(50) NOT NULL DEFAULT '', > PRIMARY KEY (`cdempresa`,`cdfilial`,`nometabela`) > ) TYPE=MyISAM CHARSET=latin1 > > the result is: > CREATE TABLE `prmsnctabelas3` ( > `cdempresa` varchar(5) NOT NULL DEFAULT '', > `cdfilial` CHAR(2) NOT NULL DEFAULT '', > `nometabela` varchar(50) NOT NULL DEFAULT '', > PRIMARY KEY (`cdempresa`,`cdfilial`,`nometabela`) > ) TYPE=MyISAM CHARSET=latin1 > > Why the type of field nometabela was changed to varchar??? > Just 'cause the structure has a field with this type?
It's a known issue. If table has VARCHAR, TEXT or BLOB column all CHAR columns longer than 3 characters are changed to VARCHAR: http://www.mysql.com/doc/en/Silent_column_changes.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]