You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT name FROM sys.databases WHERE CASE WHEN state_desc = 'ONLINE' THEN OBJECT_ID(QUOTENAME(name) + '.[dbo].[tbl_MML]', 'U') END IS NOT NULL ORDER BY 1
-- Iterate through the resulting table
OPEN @getid
FETCH NEXT
FROM @getid INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
-- FOR EACH LINE...
PRINT N'Creating dbo.tbl_Audit for database: ' + @name