From: Paul DuBois Date: April 14 1999 3:14pm Subject: Re: selecting content from one db into another List-Archive: http://lists.mysql.com/mysql/1834 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 10:02 AM -0500 4/14/99, Randall Jonasz wrote: >Hi, > >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 statement. -- Paul DuBois, paul@stripped Northern League Chronicles: http://www.snake.net/nl/