What is difference between triggers and stored procedures.
And advantages of SP over triggers ?
Answer Posted / jaya
1) Stored procedures can accept parameters and can return values. Triggers can neither accept parameters nor return values.
2) A Trigger is dependent on a table and the application has no control to not fire a trigger when not needed. On the other hand, a stored procedure can be called as needed.
3) Procedure runs only when one call them manually whereas a trigger runs when there is any activity(insert,update,delete) on table on which the trigger is written.
4) Firing of a stored procedure can be controlled whereas on the other hand trigger will get fired whenever any modification takes place on the table.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Who is the owner of mysql database?
How to set up sql*plus output format in oracle?
What is pl/sql table? Why is it used?
What steps server process has to take to execute an update statement?
what is an alias command? : Sql dba
What are commit, rollback, and savepoint?
What does inner join mean?
What is offset in sql query?
Can we create a trigger on view?
Is sql low level language?
Enlist the characteristics of pl/sql?
What is sql partition function?
Could you please provide oca (oracle 10g) dumps for my certification ?
What is type and rowtype in pl sql?
How to read/write files from pl/sql?