Re: Transfer data between tables in MySQL
| From: | benmoreassynt | Date: | Thu, 30 Nov 2006 01:44:54 +0000 |
| Subject: | Re: Transfer data between tables in MySQL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42767@lists.php.net to get a copy of this message | ||
Rosen wrote:
> Hi,
> I have to transfer all data between two tables ( with identical structure
> ) Is this possible with one query, or I must read from table1 and manually
> insert into table2?
>
> Thanks in advance,
> Rosen
INSERT INTO
dbase2.table1
SELECT *
FROM dbase1.table1 ;
That will copy from 1st database to second. If you use phpMyAdmin you can do
it via the "operations" tab.
BMA