RE: [PHP] MySQL data
| From: | Grant Walters | Date: | Wed, 18 Apr 2001 01:13:44 +0000 |
| Subject: | RE: [PHP] MySQL data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49099@lists.php.net to get a copy of this message | ||
> Can I get the data from a table in MySQL and copy/transfer all data to
> other database to a table with the same name?
>
Assuming that both databases are on the same server and that you have created the empty table in the
second database:
mysql
> INSERT INTO DATABASE2.TABLENAME SELECT * FROM DATABASE1.TABLENAME
I don't know what the implications are for large tables, possibly use mysqldump utility
instead.
Regards
Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989