Hello: Because you have a variable length column type (text) in the row, mysql changes char() types to varchar. This behavior is discussed in the manual in Silent Column Change Specifications under CREATE TABLE.
If the stored length of these columns is an issue, you can move the variable length fields to another table. However, the varchar() type reduces storage requirements without a performance penalty. If the retrieved/displayed length is the issue, you can use the LPAD or RPAD functions as appropriate. Doug On Wed, 12 Feb 2003 09:21:31 +0100, Ulla Wensman wrote: >Hello! > >When I run this script the char-fields is converted to >varchar. Row-format is dynamic. I think it is because i have a text-field in >the >script. When I change the text field to somthing else I got the datatype >char in the char-columns. I have tried to alter the colums to char but it >doesn't work. >How do I get around this problem? > >I use mysql-3.23.55-win and win2000. > >Regards Ulla > >#================================================================= ># Table: BasAtgard >#================================================================= >create table BasAtgard >( > AtgId int not null, > ArbBeskrId int not null, > Rubrik char(40) null , > Beskrivning text null , > VardeTillBaka smallint not null, > RegDatum datetime null , > RegAv char(20) null , > AndradDatum datetime null , > AndradAv char(20) null , > Raknare int null , > >PRIMARY KEY (AtgId) >) >TYPE=InnoDB; --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php