On Wed, Feb 06, 2002 at 04:10:33PM -0500, Max Mouse wrote:
> Hey all,
> 
> Is it possible to copy the contents of one column to another column
> using mySQL? I just changed my table structure by adding a few more
> columns and I need to be able to move the data from the original
> column to 4 new columns and then drop the orginial. I know that the
> proper query for sql is that I added with ALTER and remove with
> DROP. But I can't find anything that would allow me to move the data
> from one column to another. Anything I can do?

Something like:

  UPDATE mytable SET col2 = col1, col3 = col1, col4 = col1, col5 = col1;

perhaps?

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 2 days, processed 105,996,493 queries (469/sec. avg)

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