What are the Triggers?

In SQL, Triggers means a special type of pre-stored procedure that runs automatically as soon as an event occurs in the database server. There are four types of triggers in SQL:

  • Insert
  • Delete
  • Update
  • Instead of

The above questions should help you in getting started with your preparation for an MIS Interview. If you are looking to improve your skills, you can go for a professional certification course in MS Excel, SQL, or VBA. Naukri Learning offers a variety of courses that will help you to improve your skills, boost your career prospects, and earn a higher salary.

Let’s understand it with an example, Suppose you are going to create a table which will store the basic details of the user. And same time you want that if somebody stores their information. You need to make a backup every time. Or you just want an update. So you will be aware that a user has entered his basic details or update something in the table.

It works as following

AFTER INSERT: when user will enter data.

AFTER UPDATE: If any user updates any data in the table.

AFTER DELETE: If any user deletes anything in the table.