Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Into

Status
Not open for further replies.

mikeC4359

Programmer
Feb 7, 2002
2
US
Hello,
I like if someone can help me with this question.

Using a SQL Statment I like to preform a "INSERT INTO" and a "SELECT" at the same, but the "INSERT INTO" and the "SELECT" are in 2 different databases. I'm using MYSQL 3.23.45 NT.
Thanks in advance

Mike C.
 
I'm not familiar with MySQL. You should be able to use a 3-part table name. The standard SQL should look like the following.

Insert Into db1.owner.table
Select * From db2.owner.table

If this doesn't help, I suggest posting your question in the MySQL forum (forum436) and/or referencing the MySQL documentation. If you don't have documentation, yo can find it at Terry L. Broadbent - Salt Lake City, UT
Home of the 2002 Winter Olympics (Feb 8-24)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top