title: If exist update else insert records in SQL Server 2008 table
body: <p>I have one staging table and want to insert data to <code>Main</code> table, so i want to check while inserting data from staging to Main table, if exists then update the records else insert as new records. Here the issue is both the staging as well as Main table does not have any key column based on which i can compare values.</p>
  
  <p>Is it possible to do without having key columns i.e. primary key on both the tables? if yes, please, suggest me how.</p>
  
  <p>Thanks in advance. </p>