---
title: "Difference between Trigger and Stored Procedure?"  
description: "Difference between Trigger and Stored Procedure?"  
author: "Anonymous User"  
published: 2018-07-31  
updated: 2018-07-31  
canonical: https://www.mindstick.com/forum/34645/difference-between-trigger-and-stored-procedure  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 2 minutes  

---

# Difference between Trigger and Stored Procedure?

\

## Replies

### Reply by Anonymous User

These are some difference between Trigger and Stored Procedure.

A). Triggers fire implicitly while Stored Procedures fire explicitly.\
\
B). A stored procedure is a user-defined piece of code written in the local version of PL/SQL, which may return a value (making it a function) that is invoked by calling it explicitly.\
\
C). A trigger is a special type of stored procedure that runs automatically when these actions are performed like Insert, Update, Delete.\
\
D). We can do a lot of programming stuff in a stored procedure and execute again and again.\
\
E). We can create a procedure which takes the input process and give the output.\
\
F). We can handle the error through try catch.\
\
G). Stored procedures can return values but a trigger cannot return a value.\
\
H). The Trigger is called only automatically where the stored procedure can be called manually.\
\
I) With help of EXEC command, we can execute Store Procedure. But a trigger can only be executed whenever an event is fired its conditional.\
\
J). The Stored procedure can take input parameters, but we can't pass any type of parameters as input to a trigger.\
\
K). We can use transaction statements like begin a transaction, commit the transaction, and rollback inside a stored procedure but we can't use transaction statements inside a trigger because the trigger sends only warning messages.\
\
L). A stored procedure can call from the front end (.asp files, .aspx files, .ascx files, etc.) But we can't call a trigger from these files.\
\
\
\


---

Original Source: https://www.mindstick.com/forum/34645/difference-between-trigger-and-stored-procedure

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
