I'm new to MySQL and I am having difficulty understanding how to query across multiple databases.
Explaining the infrastructure, I am currently working on an assignment where I am in a public test Database that has a collection of databases.
I have an identifier value that I want to search across all of the databases that I know exists in a specific table. I'll use the table name "table1" for this example. The problem is that, not all of the databases possess the identifier column I am looking for within the table.
My question involves two parts: -How do I search all of the databases to return a collection of all of the database names that contain a particular value within this column (table1.id) -How can I verify that the column exists so that I can actually go about doing the check to see if the id that I am looking for matches the other databases' table1.id value?
To a smaller scale, I worked out the code for checking an individual table:
SELECT * FROM table1
WHERE searchId = db1.table1.id;
The difference is, I want to search all of the database table1's for this particular value while insuring that this column exists in the table first.