A trigger is a special type of a stored procedure that’s rise in the response at the certain action on the table like insert, update, and delete of data. It is executed automatically. You can’t explicitly invoke triggers. The only way to do this is by performing the required action on the table that they are assigned to.
Example:-
CREATE TRIGGER Delete_Products
ON Product
Instead Of
Delete
AS
Print “You are Not Allowed to delete Record”.
-------------
Create Trigger Insert_Products
ON Products
AFTER
INSERT
AS
PRINT “Record Inserted in the Products table”
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
A trigger is a special type of a stored procedure that’s rise in the response at the certain action on the table like insert, update, and delete of data. It is executed automatically. You can’t explicitly invoke triggers. The only way to do this is by performing the required action on the table that they are assigned to.
Example:-