What is difference between stored procedure and trigger?



What is difference between stored procedure and trigger?..

Answer / Subhash Chandra Gupta

A stored procedure is a precompiled collection of PL/SQL code that performs a specific task. It can be called multiple times when needed. A trigger, on the other hand, is a special kind of stored procedure that automatically executes in response to specific events (like insert, update, or delete) in a database.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Can we create view in stored procedure?

1 Answers  


.  have a tablle like this: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 I Want below o/p: cust acc --------------- a 1 b 2|3 c 4|5|6 Please any one can you have any ideas share me. I have urgent requirement. CUST         ACC a            dv b            fg b            bh c            mk c            cl c            so result:- A  B   c dv fg mk    bh cl       so

3 Answers  


Can we join tables without foreign key?

1 Answers  


While inserting 10 rows using procedure, if 3rd entry is having some error, what will be the output? How u will handle that error?

8 Answers   iFlex,


Does db2 use sql?

1 Answers  


Can you load data into multiple tables at once? : aql loader

1 Answers  


what will be the output: select 1 from emp union all select 2 from emp;

2 Answers   iNautix,


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

0 Answers  


What is denormalization in a database?

1 Answers  


What is the full form of sql?

1 Answers  


What does cursor do in sql?

1 Answers  


What are stored procedures in mysql?

1 Answers  


Categories