Is there any way I can remove record from table A and insert the record in table B in the same script. Please help me....
Yes you can. Steps: 1. Insert the record on table B from table A 2. If no error on 1 Remove record from table A Done!
Insert into TableA (columnList) Select EquivalentColumnList from TableB WHERE CONDITIONAL if @@ROWCOUNT>0 BEGIN Delete from TableB WHERE CONDITIONAL END