Changing types to larger shouldn't be an issue. If you are changing to
smaller, of course you are going to truncate the data more.

You do not need to move the data out and then back in again unless you
really want to.

mysql> ALTER TABLE tbl_name CHANGE `col1_old_name` `col1_new_name` text
default null

J.R. 

-----Original Message-----
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 9:37 AM
To: mysql@lists.mysql.com
Subject: varchar to text

Hello,
I created a table that uses a varchar(254) size field, and found out that
the customers data is being truncated. It needs to be larger.

Currently there are about 500 records (it is a description field) in the
column. Upon reading the docs, it looks like I need to use a "text" type
column.

I have never done an alter with records in a table, specifically when it is
client-data. How, or where, can I get information on how to alter the table
to be a text field, or do I need to copy all the data to a tmp table, create
a new table and copy all the data back to the new table with a "text"
column?

I have no experience with this area of sql.

Thanks,
Scott

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



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

Reply via email to