After trigger

Is there any reason for which we cannot use After trigger with a view?

Questions by Minakshi Sur

Showing Answers 1 - 12 of 12 Answers

sumit.sps

  • Mar 11th, 2009
 

It is a specialized  stored procedure that is executed when  data in the table associated with trigger is modified. After trigger executes the code associated with it , after the event for which it is made happens. For ex:- if after trigger is written for raising a message after DML operations is being performed , it will allow that operation to be performed and will then display the message.


create trigger trigname
on database
for insert 
as
begin
print'message'
end

  Was this answer useful?  Yes

A after trigger gets fired whenever there is any insert/update/delete happens in the table on which the trigger is defined.
But the view is just a definition rather than an actual table so insert/update/delete does not actually happens on views.
If any of the (insert/update/delete) is used with the views than the data is stored in the actual tables rather than in views.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions