Let's say I have 50 databases that all have same schema and all have table 'plays'.
Is there any possible way to SELECT all the data from table 'plays' from all the databases at once ?
Is there any way to do this if I dont know how many databases I have ?
Currently I would do this :
(SELECT * FROM db1.plays WHERE condition)
UNION
(SELECT * FROM db2.plays WHERE condition)
UNION...
(SELECT * FROM db50.plays WHERE condition)
Is there any way to write less code for this ?
Regards