Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How do I export table "practices" from db1 into db2? How do I do all tables from db1 into db2?

With Mysql, fill in the blank. What do I type at the prompt:

Mysql>
share|improve this question
    
Why are you asking first for one table then for all tables? Is there a specific issue you're working on or is this something like a homework problem? –  Bart Silverstrim Oct 20 '10 at 17:33
    
@Bartimus: I anticipate doing both in the near future and thought I'd avoid doing 2 separate questions. –  Detritus Maximus Oct 21 '10 at 12:40

2 Answers 2

up vote 0 down vote accepted

Create new table in DB2 that's a copy of practices in DB1:

Mysql> USE DB2;
Mysql> CREATE TABLE practices SELECT * FROM DB1.practices;
share|improve this answer
    
That worked. Thanks. –  Detritus Maximus Oct 21 '10 at 16:58
CREATE TABLE `db2`.`practices` SELECT * FROM `db1`.`practices`
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.