What is difference between triggers and stored procedures.
And advantages of SP over triggers ?

Answer Posted / sohail

1.Procedure is a subrotine which completly utilises the
concept of stack.
2.Procedure can be called any time when required where as
trigger once created we cannot stop the trigger to fire
when not required.
3.triggers are fired implicitly where as procedure are
called explicitly by procedure name when required.
4.the p_code of procedure is stored in oracle SGA and can
be global to others.

Is This Answer Correct ?    14 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

598


What are local and global variables and their differences?

590


What is the difference between functions, procedures, and packages in pl/sql?

486


Why we use sql profiler?

563


Explain the rollback statement?

580






Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

666


what is the difference between primary key and unique key? : Sql dba

532


Is sql a dbms?

536


What are the advantages of sql? Explain

651


discuss about myisam index statistics collection. : Sql dba

531


Which tcp/ip port does sql server run?

539


How do you remove duplicate records from a table?

511


What are the different operators available in sql?

579


Why is a trigger used?

531


what is the syntax used for partition in tsql? : Transact sql

542