Situatie
Mai jos este o procedura ce returneaza toate tabelele de pe o baza de date Microsoft SQL Server ce au definite pe ele instead of triggers.
Solutie
create procedure SearchInsteadOfTriggers_prc
as
SELECT
s.[Name] + ‘.’ + t.[Name] [Table]
FROM [sys].tables t
JOIN [sys].schemas s ON t.[schema_id] = s.[schema_id]
WHERE EXISTS
(
SELECT top 1 1
FROM [sys].triggers tr
WHERE
tr.parent_id = t.[object_id]
AND tr.is_instead_of_trigger = 1
)
Leave A Comment?