Search This Blog

Friday, September 21, 2007

Dynamic sql to perform a SQL task on a list of tables

EXEC sp_MSforeachtable 'IF ''?'' LIKE ''%tbStaging%'' BEGIN PRINT ''?'' DELETE ? END '

No comments: