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
Are connections to sql server encrypted?
How do you delete a trigger?
What are the different Topologies in which Replication can be configured?
How to connect to a sql server using odbc_connect()?
How you can change a cross join into an inner join?
What is scd (slowly changing dimension)? : sql server analysis services, ssas
What is the server name for sql management studio?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
What is difference between index and primary key?
How to enable tcp/ip protocol on a sql server?
How to replace the Query Result 'Null Value' with a text ?
What is query and its types?
What happens if null values are involved in comparison operations?
Delete duplicate rows without using rowid.
Give an example of SQL injection attack ?