Have have two tables in two different databases:
Lets say i have Database users, and Database questions. If users has a table called USER_STATS that has
USER_ID,
EDU_INT1,
EDU_INT2,
EDU_INT3
, and questions has a table called questions that have a column called CLASS_SUBJECTS.
I want to run a query that will display * from QUESTIONS where CLASS_SUBJECTS equals either EDU_INT1,EDU_INT2,EDU_INT3 where the EDU_INT‘s are determined from a specific USER_ID
Any ideas? This is semi hard because of the two different databases
When querying across two databases, you just need to prepend the database name with a
.before the table name as indatabase.table.column, and the database connection user must have access to both databases.Beyond that, this a regular
JOIN, but with a more complexONclause using 3 conditionsOR‘d together: