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
What is the command used to check locks in microsoft sql server?
Suggest a method of joining two tables.
What is difference between rownum and row_number?
What are different types of roles provided by ssrs?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
What is dirty page?
What is the size of transaction log file?
What extended events?
How can you check the level of fragmentation on a table?
Do you know the cursor optimization tips?
how to control the amount of free space in your index pages? : Sql server database administration
What is use of except clause? How it differs from not in clause?
What are the steps to follow to configure SQL*Net?
How to add a new dsn with the odbc driver for sql server?
What is Cross Join and in which scenario do we use Cross Join?