Mega Code Archive

 
Categories / MSSQL Tutorial / System Tables Views
 

Join objects and schemas

5> IF EXISTS( SELECT * 6>     FROM sys.objects o JOIN sys.schemas s 7>     ON o.schema_id = s.schema_id 8>     WHERE type = 'TR' AND 9>     s.name = 'dbo' AND 10>     o.name = 'trStudentsEcho') 11>     DROP TRIGGER trStudentsEcho 12> GO