我有存储过程:
ALTER PROCEDURE [dbo].[myDbProcedure]
@ID int
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM [myDB] WHERE @ID = [ID])
UPDATE [myDB]
SET [count] = [count] - 1
, [paymentCount] = [paymentCount] + 1
WHERE @ID = [ID]
END
现在,如果 100 个人同时更新表格任何信息都不会错过,我想要安全