What are TRIGGERS in SQL - Server

We are going to discuss about TRIGGERS in SQL – SERVER in this article. Triggers are very important in enterprises level database management. You have to understand following table: This command will create a table on which we will apply triggers: 1. Create table Staff(id int NOT NULL PRIMARY KEY IDENTITY(1, 1), name varchar(55), email varchar(55)); 2. Create table Log_Audit(id int NOT NULL PRIMARY KEY IDENTITY(1, 1), StfId int, StfName varchar(50), StfEmail varchar(50), AuditAction varchar(50), AuditTime datetime); Fill your Staff table with the following data: 1. Insert into Staff(name, email) select ‘Rajat’, ‘rajat@example.com’; 2. Insert into Staff(name, email) select ‘Anjali’, ‘anjali@example.com’; 3. Insert into Staff(name,Read More →