All… I need a way to query identical tables across multiple databases. I have roughly 30+ databases and they all have identical tables.
SELECT
a.name
, a.address
, b.company_id
, c.part_no
, c.cost
FROM accounts a
JOIN business b on a.whatever = b.whatever
JOIN crazy c ON b.things = c.things
Something simple like this, but across all databases. The focus isn’t joining on multiple databases, that’s simple, it’s running this across all databases simultaneously. There’s got to be a simpler way than creating a long drawn out stored procedure, no?
1 Answer