title: hov create ms sql Trigger on many rows (like oracle FOR EACH ROW)
body: <p>In oracle i create triggers without problems, but in tsql i heave one big problem :)</p>
  <p>I have a job, who insert rows into one tabel:</p>
  <pre><code>SELECT wa.IdAnkiety      
       ,wa.IdUsterkiService
        ,wa.LiczbaGlosowTak
         ,wa.LiczbaGlosowNie   FROM [SERV-SQL01].[DomTransfer].[dbo].[D5Cts_WynikiAnkiet] wa   where not
   exists (select wy.IdUsterkiService     from dba.DOM_WyAnkiet wy 
      where   wy.IdUsterkiService=wa.IdUsterkiService     and
   wy.IdAnkiety=wa.IdAnkiety)```
  
  And on this: dba.DOM_WyAnkiet tble I heave a trigger
  
  </code></pre>
  <pre><code>ALTER trigger [dba].[wyankiet]
  on [dba].[DOM_WyAnkiet] AFTER insert
  AS
  begin
  
  declare @DefectActId uniqueidentifier,
          @tak int,
          @nie int;
  
      select @DefectActId=IdUsterkiService, @tak=tak, @nie=nie from inserted;
  
      if @tak&gt;@nie
          update dba.DefectAct set status='49A86504-2E7D-46AB-A022-FC4C3C8CA853', InspectionDate=GETDATE() where DefectActId=@DefectActId;
  
      if @nie&gt;@tak
          update dba.DefectAct set status='2EDA9FB2-8ED2-43AC-8C30-348D3F060CE3',InspectionDate=GETDATE() where DefectActId=@DefectActId;
  
      if @nie=@tak
          update dba.DefectAct set status='588B5BAA-F7CE-455D-9489-B2B956949449',InspectionDate=GETDATE() where DefectActId=@DefectActId;
  
  end
  </code></pre>
  <p>But seems thats nor works
  in oracle i add the FOR EACH ROW command and something like here above are works.</p>