title: How to create a trigger that uses INSERT , DELETE , UPDATE events
body: <p>I want to create a trigger for logging.So i need event names of INSERT,UPDATE or DELETE.i.e : one of these statements is used in query execution my trigger will trig and starts logging.</p>
  
  <pre><code>SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  CREATE TRIGGER LogBuses 
   ON  Bus_table 
   AFTER INSERT,DELETE
   AS 
  BEGIN
  DECLARE @PlateNo nvarchar(50)
  IF INSERT//something like that-INSERTING- DELETING
      SELECT @PlateNo=PlateNo from inserted
  insert into Logger (EffectedTable,ActionName,EffectDate,EffectedID) 
  VALUES ('Bus_table','Insert',SYSDATETIME (),@PlateNo);
  ELSE IF DELETE 
      SELECT @PlateNo=PlateNo from deleted
  insert into Logger (EffectedTable,ActionName,EffectDate,EffectedID) VALUES ('Bus_table','Insert',SYSDATETIME (),@PlateNo);
  </code></pre>
  
  <p>END
  GO</p>