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
What are the advantages of using third-party tools?
What is the use of keyword with encryption.
Explain about Joins?
Can You Use Data Mining Models In Ssrs?
What is 'write-ahead log' in sql server 2000 ?
How to insert a new row into a table with "insert into" statements in ms sql server?
What are the underflow and overflow behaviors on float literals?
What is the sql case statement used for? Explain with an example?
What is the use of =,==,=== operators?
Write a sql query to sort on different column name according to the parameters passed in the function?
What are sql servers used for?
What is dimension table? : sql server analysis services, ssas
What is the current limitation of the size of SQL Azure DB?
What part does database design plays a role in performance of an sql server-based application?
Explain DBCC?