SQL trigger is a stored program that invoked by the database automatically when any change in the event occurs. The trigger is known as a particular type of stored procedure because triggers are called directly, which is not done in case of stored procedures.

The only difference between SQL triggers and  stored procedures is that stored procedure needs to be called explicitly, whereas SQL triggers are called implicitly. SQL triggers are invoked when a row is  inserted in a table, or any columns are being updated.

SQL Triggers example

SQL triggers are the stored programs, which are automatically fired or executed when some events take place. It is like event-based programming. Triggers are written to be executed in the response to any of the following events.

#sql #sql trigger

SQL Trigger Example | Triggers in SQL Tutorial
1.40 GEEK