Home > database >  About the upsert need to insert and update statistics counting problems respectively
About the upsert need to insert and update statistics counting problems respectively

Time:10-11

Now is simply wants to pass a upsert statement, we can insert to update the data at the same time, the difference between for insert and update statistics ~

Now my practice is two upsert statement
Article 1: the upsert do nothing returning for the newly inserted data
Article 2: the upsert do update returning to get all the data
Then all of the data - insert the data=data update

The two SQL efficiency is too low, think through a upsert SQL access to insert and update the statistic of ~
Please give a direction and suggestion ~ thank you
  • Related