SQL Triggers: Prepared By: Rahim Suwal (29) Shyam Rajak
SQL Triggers: Prepared By: Rahim Suwal (29) Shyam Rajak
Prepared by:
Rahim Suwal (29)
Shyam Rajak (40)
Triggers
● Triggers are the special types of logic that are ran
automatically by the database whenever a event
occurs.
● The events are insert, update and delete etc.
Demo 1
GUI based
Demo 2 GUI Based
Use of Inserted and deleted tables
Summary of Demo 2
● Triggers are nothing but logic, simple SQL
codes which are fired after/before some events.
● 2 temporary table: Inserted table and deleted
table.
● Inserted table have new value and deleted
have old.
Disable Triggers
Syntax
Syntax
https://www.sqlservertutorial.net/sql-server-triggers/
https://www.geeksforgeeks.org/sql-trigger-student-database/
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-trig
ger-transact-sql?view=sql-server-ver15
https://www.essentialsql.com/what-is-a-database-trigger/
Thank you