title: How to write Triggers in sql server 2008?
body: <p>In sqlserver 2008, i write trigger like this but i am little bit doubt that it is wrong can you check this once.</p>
  
  <pre><code>ALTER trigger [dbo].[UST_RollPlan_History_Trigger]
             on [dbo].[Tbl_F_Roll_PlanDetails_T] for INSERT as
      insert into Tbl_F_Roll_PlanDetails_H
                  (rollingplanid, productcode, rollplanmonthyear,
                   rollplanyear,  candflocation, quantity, amendedqty,
                   createdby, createdon, sessionid, status)
      select       rollingplanid, productcode,rollplanmonthyear,
                   rollplanyear, candflocation,quantity,amendedqty,
                   createdby, createdon, sessionid, status
      from         Tbl_F_Roll_PlanDetails_T
  </code></pre>