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.

Recommended Answers

I think good example to use triggers!

Jump to Post

All 2 Replies

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.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.