The following code sample shows how to Create triggers for Updating
Trigger for updating
create trigger tg_Update on StudentsMarks after update as begin declare @StudentId int ,@StudentName varchar(25),@Total int select @StudentId=StudentId,@StudentName=StudentName,@Total=Subject1+Subject2+Subject3+Subject4 from inserted update Studentstotal set Studentname = @StudentName,Total=@Total where StudentId = @StudentId end
|
No responses found. Be the first to respond and make money from revenue sharing program.
|