title: how to work with after insert trigger in sql server 2008
body: <p>i am working on sql server, where i want to insert the record in a particular table say (a), this table contains two column [id (Identity Field) and name(nvarchar(max)] now after the records is inserted in table (a), a trigger should fire and insert the identity field value in table b.... i am using after insert trigger for this purpose but i am not getting how i would be getting the identity field value in trigger... which should be inserted in table b.</p>
  
  <p>This is what i am using</p>
  
  <pre><code>create trigger tri_inserts on (a)
  after insert
  as
  begin
     insert into b (id, name) values (?,?)
  end
  </code></pre>
  
  <p>Please reply as soon as possible..
  Thanks and Regards
  Abbas Electricwala</p>