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
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?
What is triggers and its types?
What is difference between sql and sql server?
What are the difference between primary key and unique key? : sql server database administration
what is the difference between delete table and truncate table commands? : Sql server database administration
What is a primary index?
What is the difference between osql and query analyzer?
What is the maximum length of an alert name?
How to verify a user name with sqlcmd tool?
What is mapping schema?
What is model database? : SQL Server Architecture
What is query optimization process?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
What is the use of partition by in sql server?
What are the difference between “where” and “having” clause in sql server?