Viewing post 1 (of 1 total)
You could capture the SQL statements in a variable and then execute it:
DECLARE @Sql nvarchar(max);
SET @Sql = '';
SELECT @Sql +='DROP TABLE [' + s.name + '].[' +tab.name + '];'...
September 22, 2016 at 8:01 am
#1902475