I have two tables: p.Test and q.Test on two different Databases - p and q.
Both these tables have different MYSQL connections and are on two different servers.
I need to do a Natural Join as is given here : http://www.microshell.com/database/sql/comparing-data-from-2-database-tables/2/
How do I possibly do that? I am using java PreparedStatement as well to actually run the query. Is there a way to possibly do this?
Say I create two Connections to each of them:
Connection conn1 = DriverManager.getConnection(URLtoPDB, Username,Password);
Connection conn1 = DriverManager.getConnection(URLtoQDB, Username,Password);
How do I fire a preparedStatement to even do say: select * from p.Test,q.Test