用事务为防止并发时多次更新同一记录(锁)
--准备测试表及测试数据USE tempdbGOIF OBJECT_ID('task') IS NOT NULL DROP TABLE taskGOCREATE TABLE task ( taskId INT IDENTITY(1,1) PRIMARY KEY ,taskName NVARCHAR(50) NOT NULL ,d DATETIME NOT NULL DEFAULT(...