title: drop trigger if exists and create
body: <p>I would like to check if the trigger exists on [tbl] and create another one. I tried it this way but didn't work. What am I doing wrong?</p>
  
  <pre><code>IF EXISTS (SELECT * FROM sys.objects WHERE [name] = '[dbo].[trg]' AND [type] = 'TR')
        DROP TRIGGER [dbo].[trg] ON [dbo].[tbl]
  GO
  CREATE TRIGGER [dbo].[trg] ON [dbo].[tbl] 
  AFTER DELETE
  AS
  BEGIN
     //
  END
  GO
  </code></pre>