What do you mean by optimization of the column? Are you saying that 
char takes less space than varchar or the performance on char is better 
in queries compared with varchar ?

The whole concept of "CREATE ....AS" is that you want target table to 
inherit all the properties with the data of the source tables and the 
columns. So I don't understand why should/would it change the data 
types of columns.

thanks

Vivek

> -----Original Message-----
> From: bvyas3 [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 14, 2002 6:36 PM
> To: CHAUDHARY, Vivek; mysql
> Cc: bvyas3
> Subject: Re: varchar to char ...
> 
> 
> Mysql optimizes the column type while creating the table.
> 
> Regards,
> Bhavn.
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 14, 2002 2:26 PM
> Subject: varchar to char ...
> 
> 
> > Hi guys,
> >
> > I have a query.I am not sure if this is a bug or a feature (ha ha
> > ha...).
> >
> > Table - abc
> >   name varchar(30),
> >   address varchar(50)
> >
> > Then I run this sql.
> >
> > create table temp_abc as
> > select * from abc;
> >
> > datatypes of the columns changes:
> >
> > Table - temp_abc
> >   name char(30),
> >   address char(50)
> >
> > any clues,
> >
> > Vivek
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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
>


---------------------------------------------------------------------
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



---------------------------------------------------------------------
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

Reply via email to