Ms Sql server primary key concurrency conflict resolution

Cause of the problem, colleagues from the growth of the primary key table ID, into a custom number, there is no strict concurrency testing. When multiple threads simultaneously insert data will cause the primary key conflict;

Read some fellow article, try several methods. Tested using WITH (updlock) can be resolved.

Guess you like

Origin www.cnblogs.com/michaelye/p/11362989.html