We have 2 Tables, One is Primary Table and another one is a Transaction Table. Both Tables are identical.
We have to insert or update the record in Primary Table, based on Transaction Table.
If a record is found identical on primary keys for Primary and Transaction Table, we would update, else we need to insert the record in Primary Table.

I think good example to use triggers!

You use a trigger on the main table that will uodate on insert to the other table whenever a query is run

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.