title: SET NOCOUNT ON usage- correct position in SQL Server 2012 trigger
body: <p>My question concerns the correct positioning of <code>SET NOCOUNT ON</code> in a trigger- after a bit of Googling it's position relative to 'BEGIN' seems in dispute. 
  We have multiple triggers similar to that below, one of which is still returning results to the application. Is the correct position for <code>SET NOCOUNT ON</code> immediately after '<code>BEGIN</code>'?</p>
  
  <pre><code>SET ANSI_NULLS ON
  GO
  
  SET QUOTED_IDENTIFIER ON
  GO
  
  CREATE TRIGGER [scheme].[T_AD_IU_STOCKM] ON [scheme].[stockm]
  AFTER INSERT, UPDATE
  AS 
  SET ANSI_NULLS ON 
  SET ANSI_WARNINGS ON
  SET NOCOUNT ON
  IF (update([alpha]) or update([catalogue_number]) or update([current_cost])       or update([description]) 
  or update([expected_cost]) or update([long_description]) or update([physical_qty]) or update([price])
   or update([product]) or update([standard_cost]))
  
  BEGIN
  //Should 'SET NOCOUNT ON' be here?
      insert into Bespoke_JLA.dbo.MOD_STOCKM
      SELECT 
          distinct i.product, i.warehouse, getdate()
      FROM 
          inserted i
      WHERE 
          i.warehouse in ('PH', 'MH');
  END
  
  GO
  </code></pre>