Free eBook: Understanding Databases


Chapters selected by David Clinton

Introducing SQL


From SQL in Motion
By Ben Brumm

Looping over Databases on a Server

In this article from chapter 2 of SQL Server DMVs in Action, author Ian Stirk discusses a quick method of creating temporary tables, which is needed when we want to loop over all databases on a server, extracting the results as we go.

Looping over Databases on a Server (PDF)

© 2020 Manning — Design Credits