Include new table in several Mysql database at one time

1

I do not know if it would be possible, but we took a PHP / Mysql system from which each client has its own database. But we are creating another tool for this system and of course, it will have a new table in the databases. The problem is that this system, as said before, has a total of 23 databases and each bank belongs to a customer registered in that system.

Is it possible, when developing a new table, to include it in all these databases at once through some SQL command, or will we have to go from one database to the next to install this new table?

    
asked by anonymous 26.04.2018 / 13:16

1 answer

1

Good morning, you can use the code below when you want to change from bank, before running the table creation script. You can make a sequence or a for.

USE DB_NomeBanco GO 
Select * from tabela
    
26.04.2018 / 16:41