Looking for some help to extract a particular value from each database from the same column in Azure SQL.
Instead of running the same SELECT statement against 80+ databases, I am looking for a SQL script or if there are any in-built Stored Procedures which I can run against master database which can fetch the DatabaseName and the value I am looking for in each database.
I have tried sp_MSforeachdb
, however it keeps saying:
Could not find stored procedure 'sp_MSforeachdb'.
I have tried using PowerShell (using foreach loop) which works, however would like to check if it can be done within MS SQL.
Any help is much appreciated.