Difference between Triggers and Stored Procedure

Answer Posted / ajay panchal

Triggers are automatically run but stored procedures are not automatically run and they have to be called explicitly by the user.

we can write a stored procedure within a trigger but cannot write a trigger within a stored procedure.

Trigger is attached to table or view and is fired only when an INSERT, UPDATE, and/or DELETE occurs, while a stored procedure executes at any time when it is called.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is foreign key related to primary key?

720


Does transparent data encryption provide encryption when transmitting data across the network?

805


what is the information that can be stored inside a bit column? : Sql server database administration

710


How do clustered indexes store data?

804


explain the storage models of olap? : Sql server database administration

681






How many triggers you can have on a table?

701


How check triggers in sql server?

672


What is RAID? What are the different types of RAID configurations?

805


What is a deadlock and what is a live lock?

756


How do you create a data source?

651


How to enable/disable indexes?

776


What is merge?

745


Do you know how to store and query spatial data?

782


explain extended properties

714


Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?

733