title: SQL Server events on insert
body: <p>I have two tables in SQL Server. I want to raise an event when client inserts any row in order to copy that row to another table with more columns. </p>
  
  <p>I have to do that in SQL Server just after insert. Is this possible? And if it is... how?</p>
  
  <p>I need something like this:</p>
  
  <pre><code>CREATE EVENT myevent
      ON (INSERT ROW?)
      DO
        TODO...
  </code></pre>
  
  <p>But I don't know if there are any event on insert and I don´t know where does the code go.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:</p>
  
  <p>I have another problem added. The tables are in different databases. I'm trying to implement this trigger:</p>
  
  <pre><code>    USE [DB1]
      GO
  
      SET ANSI_NULLS ON
      GO
      SET QUOTED_IDENTIFIER ON
      GO
  
  ALTER TRIGGER [TRIGGER_NAME] 
     ON  [dbo].[TABLE_TRIGGERED]
     AFTER INSERT
  AS 
  BEGIN
      SET NOCOUNT ON;
  
      INSERT INTO DB2.[dbo].[FINAL_TABLE] 
      SELECT *
      FROM INSERTED
      WHERE COL1= 'Stuff' AND COL2= 'Stuff' AND COL3=
      (
          SELECT MAX(COL3)+1
          FROM DB2[dbo].[FINAL_TABLE]
      )
  
  END
  </code></pre>
  
  <p>And it can't access to COL1, COL2 and COL3. Is my sintax right?</p>