SQL Server: Applying Filter on sp_MSforeachDB

added by lionofdezert
8/10/2012 5:03:20 AM

1 Kicks, 120 Views

Working on multiple databases on a single instance, sometime you need to execute a query for each database and for that sp_MSforeachdb is the best choice. BUT a wast majority of SQL Server user don't know how to apply filter on sp_MSforeachdb.