• Yes, I agree. There's also an sp_msforeachdb function available....

    But I needed to learn the cursor