MySQL Forums
Forum List  »  Newbie

Re: Create new table and insert other table data
Posted by: Ramalingam Chelliah
Date: August 26, 2004 05:53AM

Hi ,

RootChaos RootChaos wrote:
> i also notice that the field types changed from
> VARCHAR(100) to only CHAR(100) on the imported
> fields. Any idea here ?

If you like to CHANGE field definitions ALTER that table accordingly...

Suppose Field2 changed from VARCHAR(100) to CHAR(100)

( This is not a serious error
CHAR(100) occupies strictly 100 bytes
what ever data you enter say 'hai'
but VARCHAR(100) can have at the most 100 bytes
It takes 3 bytes(I assume) to store 'hai'
and 4 bytes to store 'lies' and so on


Do like this

mysql> ALTER TABLE CHANGE Field1 Field1 VARCHAR(100)

give Field1 two times to have that name itself or rename it
Instead of VARCHAR(100)

Hope this helps ,

We Learn the Most When we have to Invent

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.