---
title: "Define  trigger?"  
description: "Define  trigger?"  
author: "Sunil Singh"  
published: 2017-06-14  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/23264/define-trigger  
category: "database"  
tags: ["sql server"]  
reading_time: 1 minute  

---

# Define  trigger?

A database trigger is a code or programs that automatically execute with response to some event on a table or view in a database. Trigger helps to maintain the integrity of the database.\

**Example:** When a new student is added to the student database, new records should be created in the related tables like Exam, Score and Attendance tables.

## Answers

### Answer by Sunil Singh

A database trigger is a code or programs that automatically execute with response to some event on a table or view in a database. Trigger helps to maintain the integrity of the database.\

**Example:** When a new student is added to the student database, new records should be created in the related tables like Exam, Score and Attendance tables.


---

Original Source: https://www.mindstick.com/interview/23264/define-trigger

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
