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
Why use view instead of a table?
Why use identity in sql server?
How to create a dynamic cursor with the dynamic option?
What new data source types were added in ssrs 2014?
Can we create clustered index on composite key?
What is normalization according to you and explain its different levels?
How to defragment table indexes?
Explain syntax for viewing, dropping and disabling triggers?
What is sql server database?
Explain what is the purpose of sql profiler in sql server?
Explain the properties of subqueries in sql server?
Explain mixed authentication mode of sql server?
What is the difference between ‘having’ clause and a ‘where’ clause?
What is delete query?
How to transfer a table from one schema to another?