What is the difference between execution of triggers and stored procedures?



What is the difference between execution of triggers and stored procedures?..

Answer / Shobhit Rastogi

Stored Procedures are user-defined program units, which can contain SQL statements, PL/SQL blocks or other procedural code. They can be called explicitly by the application when needed. On the other hand, Triggers are automatically executed by the database server in response to specific events such as INSERT, UPDATE or DELETE on a table or view. Stored Procedures run at a user's request, while Triggers run in response to database actions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 all the emp which does not have any dept? Q4 get all the emply detais with the dept details it dept is exit otherwise any emp details? Q5 how to debugg the dynamic sql and packages?

2 Answers  


What are the events on which a database trigger can be based?

1 Answers  


Is it possible to update views?

1 Answers  


Why stored procedure is better than query?

1 Answers  


Source is Sales Table: Sno Prod Sales Sales_Amount 1 A 10 2000 2 A 20 1000 3 C 10 3000 4 D 30 4000 5 A 20 1000 Target : Sales_Count T_Sales_Amt Sales_Count(A) T_Sales_Amt(A) 90 11000 50 4000 In single query, pls tell me.

5 Answers   CGI,


What is a sql instance vs database?

1 Answers  


how can we submit a form without a submit button? : Sql dba

1 Answers  


What is online transaction processing (oltp)?

1 Answers  


What is informix sql?

1 Answers  


What is a join?

1 Answers  


What is acid property in a database?

1 Answers  


How to find string or key value using pl/sql code?

2 Answers   Ramco,


Categories