0

Please could someone help, i'm really stuck.

I have a mysql database with two tables ( with thousands of rows ), each table has a column called 'map' and i need to copy all the rows from one tables column to the 'map' column of the other table?

I know it seems simple but i'm getting in a jumble

4

3 回答 3

0

像这样的东西会起作用。

UPDATE table_to
       JOIN table_from
       <put join here>
SET table_to.map = table_from.map
于 2013-02-19T20:19:39.520 回答
0

或者只是简单地使用下一个。这会将 table_from 中的所有行与 map 列中的值插入 table_to 的 map 列。

INSERT INTO table_to
(map)
SELECT map FROM table_from
于 2013-02-19T20:38:20.917 回答
0

在mysql中将数据从一个表复制到另一个表

插入到database1. table1选择 * 从database2table2;

于 2014-06-17T16:59:43.190 回答