adspace


Difference between Triggers and Stored Procedure

Answer Posted / bed singh

1. Triggers can only be implemented on tables or views but
Stored Procedure in independent code that can be specific
to database.

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

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

4. 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 ?    75 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Equi join and non equi join is possible with sql server?

1141


Explain “row_number()” in sql server with an example?

1089


What are the kinds of subquery?

1119


What are the source of constraints?

1019


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8247


How to connect php with different port numbers?

1209


What is subquery? Explain the properties of a subquery?

1077


Why should you use or avoid select * statements?

1127


What is a coalesce function?

1295


How to rebuild the master database?

1176


How to convert numeric expression data types using the cast() function?

1160


How can we solve concurrency problems?

1133


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1140


Does view occupy space?

1039


What is sql server query analyzer?

1141