INSERT into one db SELECT results from another db
Is there a way to INSERT the data from the resultSet of a SELECT statement from one Database to another?
I have two databases (currently on the same server, but will be on separate servers in production) that I want to be able to query one for data to be inserted into tables on the other. At the moment the only way I see to do it is to loop through the resultSet from the SELECT query and build a new INSERT statement to put the data in the second database. I was hoping some of you have done this more efficiently.
I am using mysql for my database servers.
thanks,