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
What is the tcp/ip port on which sql server runs?
How to copy the tables, schema and views from one sql server to another?
What is the difference in accessing db between sql server vs sql azure?
How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?
What happens if you insert a duplicate key for the primary key column in ms sql server?
Why we need sql server?
How we create SQL Server 2005 Reporting Services ? Give me Sample
What is an expression in ms sql server?
Explain different types of index?
Explain what is the function of sql server agent windows service?
How to create a simple stored procedure in ms sql server?
What is dirty read?
What is the difference between update lock and exclusive lock?
What is a group function explain with an example?
do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration