Solved

Demonstrate joining of two mysql databases

Posted on 2014-12-21
2
266 Views
Last Modified: 2015-01-05
I have mysql and want to write some syntax demonstrating the joining of two databases into a single table.  Assistance is greatly appreciated.
0
Comment
Question by:frugalmule
  • 2
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40512115
INSERT INTO db1.newtable 
SELECT * FROM db1.tablename
JOIN db2.tablename ON db1.id = db2.id

Open in new window


This assumes all column names follow the same order as the new table else you would have to specify them in the select statement.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40512116
And rereading again maybe I'm misunderstanding
joining of two databases into a single table
What exactly do you mean?
Is this two tables with the same data but in two db's and you just want to move all the rows to one table?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help subtracting a value within my script 7 42
Unrecognized Database Format 8 89
Query Same ID From Multi-Record To One Record 4 26
DBF to ... Converter 5 29
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now