Home > database >  SQL server delete after extraction quantity will be pick them to the other session
SQL server delete after extraction quantity will be pick them to the other session

Time:09-15

Every time I extract 100 data to the customer, and will delete this article 100 data,
could you please tell me: if at the same time there are ten customers in this extract, data will be extracted to repeat?


The code is as follows:
 begin transaction 
Select top 100 * into # temp from Cookie - 100 data extracted in # temp
Delete the from a Cookie a inner join # temp b on b.i d=Anderson, d - and in just 100 data delete
Commit the transaction
Select * from # temp
Drop table # temp


CodePudding user response:

Under high concurrency, these statements would be a duplicate,

We can consider to use the update top N lock a batch of data,

CodePudding user response:

reference 1st floor selling fruit net reply:
high concurrency, these statements would be a duplicate,

We can consider to use the update top N lock a batch of data,
excuse me specific how to operate

CodePudding user response:

Top of the
  • Related