how to use two tables in a single query, which are in different databases, means,
SELECT table1.id, table1.name, table2.id, table2.telephone
FROM table1, table2
WHERE table1.id = table2.id
here, table1 and table2 are in separate database.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do cross-database joins, no problem. Simply prefix your table name with database name.
Be wary of permissions, though. If a user doesn’t have access to one of the databases, this select will fail.