Skip to content
Advertisement

Perform same SQL query on multiple databases

I’m trying to adapt an SQL query to check the value present in a certain field that is present in every database on my server.

There are 100 individual databases, and I would like to check a specific record of each one.

The answer is probably to use a command like the one below, but I’m having difficulty adapting it.

I have had greater success with the link below;

https://stackoverflow.com/a/18462734/3461845

I need to be able to perform this query:

And also pull back the name of the database for each row that is returned;

Any help is greatly appreciated.

Thanks!

Advertisement

Answer

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement