create Trigger uptrigger
on HumanResources.EmployeePayHistory for UPdate
as
Begin
declare @rate as money
Declare @frq as int
select @rate=Rate,
@frq=payfrequency from Inserted
select @rate*@frq*30 as 'Monthly salary'
end
Update HumanResources.EmployeePayHistory
set rate=rate+5
Where EmployeeID=160
on HumanResources.EmployeePayHistory for UPdate
as
Begin
declare @rate as money
Declare @frq as int
select @rate=Rate,
@frq=payfrequency from Inserted
select @rate*@frq*30 as 'Monthly salary'
end
Update HumanResources.EmployeePayHistory
set rate=rate+5
Where EmployeeID=160
No comments:
Post a Comment