What is Triggers in Sql Server

What is Triggers in SQL Server?

  1. A trigger is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.
  2.  It is a database object which is bound to a table and is executed automatically.
  3.  You can’t explicitly invoke triggers. 
  4. The only way to do this is by performing the required action no the table that they are assigned to.

Types Of Triggers

There are three action query types that you use in SQL which are INSERT, UPDATE and DELETE. So, there are three types of triggers and hybrids that come from mixing and matching the events and timings that fire them.

Basically, triggers are classified into two main types:- 

(i) After Triggers (For Triggers) 
(ii) Instead Of Triggers 

No comments:

Post a Comment

How to register multiple implementations of the same interface in Asp.Net Core?

 Problem: I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { ...