---
title: "What is Trigger in Sql Server?"  
description: "What is Trigger in Sql Server?"  
author: "Anonymous User"  
published: 2018-07-31  
updated: 2018-07-31  
canonical: https://www.mindstick.com/forum/34643/what-is-trigger-in-sql-server  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# What is Trigger in Sql Server?

Please Give me a suitable Example.

## Replies

### Reply by Anonymous User

A trigger is a special type of a stored procedure that’s rise in the response at the certain action on the table like insert, update, and delete of data. It is executed automatically. You can’t explicitly invoke triggers. The only way to do this is by performing the required action on the table that they are assigned to.

Example:-

```
CREATE TRIGGER Delete_Products
ON Product
Instead Of
Delete
AS
Print  “You are Not Allowed to delete Record”.
-------------
Create Trigger Insert_Products
ON Products
AFTER
INSERT
AS
PRINT   “Record Inserted in the Products table”
```

![What is Trigger in Sql Server?](https://www.mindstick.com/mindstickforums/b893579e-5855-45de-8a3d-99c6a321e46d/images/f71b44e7-5312-4f6e-97b8-1978b632d0d4.png)\


---

Original Source: https://www.mindstick.com/forum/34643/what-is-trigger-in-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
