RSSAmplifier

Simon Morgan · Aug 5, 2020

sp_MSforeachtable Table Filtering

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

SQL Server provides the handy sp_MSforeachtable stored procedure for executing the specified T-SQL for each table in a database. But what if you only want to run it for certain tables? I found myself in this boat but a bunch of the recommendations I came across didn’t work. The whereand parameter was clearly what I wanted. However, say we wanted to filter out all tables whos names…

Read on /blog/sp_msforeachtable-filtering/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.