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
How to drop an existing user defined function in ms sql server?
What happens if you delete a table that is used by a view?
What are the differences between having and where clause.
What is hot add cpu in sql server 2008?
What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?
how many clustered indexes can be created on a table? : Sql server database administration
Explain in brief how sql server enhances scalability of the database system?
Why do we use functions?
What is etl - extraction, transformation, and loading?
How do you handle datasets larger than 50 gb?
How to connect to SQL Azure Database by using sqlcmd?
Is mysql the same as sql server?
What is surrogate key? : sql server analysis services, ssas
When is the use of update_statistics command?
How to make conditional sum in ssrs?