List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 14 1999 3:14pm
Subject:Re: selecting content from one db into another
View as plain text  
At 10:02 AM -0500 4/14/99, Randall Jonasz wrote:
>I was wondering if someone could help me with the following problem.  I
>need to copy some content from a table in one database and import it
>into a table in another mySQL database.  I was thinking of writing a
>script to format the output of
>select * from directory where parent = num into outfile ~/dirtable.txt
>with the appropriate insert into table values( ...,...,....); format.
>Is there an easier way of accomplishing this through mySQL?

Are you talking about selecting data from one MySQL database
and inserting it into another?  You can do that with a single
statement, just name your tables using db_name.tbl_name syntax
and use the INSERT INTO ... SELECT ... FROM form of the INSERT

Paul DuBois, paul@stripped
Northern League Chronicles:
selecting content from one db into anotherRandall Jonasz14 Apr
  • Re: selecting content from one db into anotherPaul DuBois14 Apr