Techiio-author
Started by Debarghya DasSep 29, 2021

Open
Iterate query over all schemas?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I'm working with a code base where each time a routine is run, it creates a new schema in MySQL with identical structure.

What I'm looking to do is to iterate over all schemas and run a query on a given table in that schema. Ideally, it would also print out the name of the schema on each result line.

I can't figure out a way that doesn't involve building a heady sproc to do this.

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance