2 Replies Latest reply: Feb 23, 2016 1:12 PM by Hirish V RSS

    Looping different mysql databases

    David Arroyo de la Peña

      Hi all,

      I have a mysql table containing the names of several databases, and I want to make the same query in that databases.


      So I would need something like that:


      select db from mydatabases;

      for( every db in mydatabases )


        select name from db.employees;



      Can anyone give me an idea of how to manage with this?


      Thanks in advance.


      Best regards,