<syed@stripped To: <mysql@stripped>
Subject: How to move data between tables
in a database?
I would like to move data between tables in mysql within the same
database, I am not sure what the best way to go about it is.
I do not need to move all the data in the tables, just the output of
some select statements.
>> You could use INSERT INTO TABLE2(SELECT * FROM TABLE 1)
>> From Manual on page http://www.mysql.com/doc/en/INSERT.html
INSERT [LOW_PRIORITY | DELAYED] [IGNORE]
[INTO] tbl_name [(col_name,...)]
I am using Perl DBI and MySql 4.0.15-standard on RedHat 8.0.
I guess I can run a select statement and copy all the data into a Perl
array, then copy the data into another MySql table and then delete from
the original table. But this seems like "too much" work, perhaps there
is an easier way?
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1