CREATE TRIGGER TR_2 ON BeginTran for insert
as
begin
update MotorInfo
set MotorInfo.CCCS = MotorInfo.CCCS +1
where MotorInfo.MotorNo = inserted.MotorNum
end
错误原因:。。。。
解决方法将inserted.MotorNum改为 select MotorNum from inserted
CREATE TRIGGER TR_2 ON BeginTran for insert
as
begin
update MotorInfo
set MotorInfo.CCCS = MotorInfo.CCCS +1
where MotorInfo.MotorNo = inserted.MotorNum
end
错误原因:。。。。
解决方法将inserted.MotorNum改为 select MotorNum from inserted