Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between procedure and function,
procedure and trigger?

Answers were Sorted based on User's Feedback



what is difference between procedure and function, procedure and trigger?..

Answer / arup ratan banerjee

Procedure and Function
----------------------
1)Function return atleast one value
Procedure may or may not return value

2)Function can be a part of expression
Procedure can't be a part of exception

Procedure and Trigger
----------------------
Procedure need to be executed explicitly
Trigger gets automatically executed when insert update or
delete is fired on a table.



commit can be done in procedure
commit cannot be done in case of triggerrs except for
autonomous transactions

Is This Answer Correct ?    47 Yes 4 No

what is difference between procedure and function, procedure and trigger?..

Answer / roopesh kumar

Diff. B/W Procudure & Func......
(1) Proc. may or may not return value or more than one.
but func. must return a single value.
(2) We can call a func. in a select stmt. but func. should
only with IN parameter.
But we can't call a procedure inside a selct stmt.
because calling a procedure itself a PL/SQL block.

There is no too much diff. b/w proc. & func. but the thing
is that when we are looking to get back a single value we
should use func. in case of more than one then we should go
for proc.

Diff. b/w proc. & trigger..

(1) We have to call a proc. explicitly but trigger will
fire implicitly with assosiated event.

Is This Answer Correct ?    21 Yes 4 No

what is difference between procedure and function, procedure and trigger?..

Answer / ganesh ganjre

Diff. b/w proc. & trigger..
procedure can be called from trigger but trigger can't be
called from procedure.
Trigger(Implicitly)
Procedure(Explicitly)

Is This Answer Correct ?    14 Yes 1 No

what is difference between procedure and function, procedure and trigger?..

Answer / suresh somayajula

Difference between Procs & Triggers is;

We have control over the firing of Stored Proceudres,
but we don't have control over the firing of Database
Triggers.

Is This Answer Correct ?    12 Yes 3 No

what is difference between procedure and function, procedure and trigger?..

Answer / jagadesh

procedure can take parameters as argument's but triggers
cannot take parameters as arguments

Is This Answer Correct ?    7 Yes 2 No

what is difference between procedure and function, procedure and trigger?..

Answer / manish

PROCEDURE ARE NOTHING THEY R JUST STEPS OD DOING SOMETHING
PROGAMATICALLY...SO USE IT

Is This Answer Correct ?    1 Yes 1 No

what is difference between procedure and function, procedure and trigger?..

Answer / qx1789

he major difference to keep in mind is that trigger code is hard-parsed every time the trigger runs. You should therefore code all of your trigger actions in stored procedures (preferably implemented in packages, per good programming practice), and limit the trigger body to a PL/SQL block that just invokes the procedure. Learn sql from https://www.youtube.com/watch?v=7Vtl2WggqOg

Is This Answer Correct ?    0 Yes 0 No

what is difference between procedure and function, procedure and trigger?..

Answer / gvk

functions and procedures:
1.Functions Returns a value, procedure not return a value.
2.parsed & compiled at runtime, Procedure stored as a
pseudo code in database ie. Compiled form.
3.Cannot effect the state of database,sp effect the state
of database using Commit etc..
4.mainly used to compute the values, sp used to process the
tasks.
5.It can be invoked from sql statement :eg:select, sp can
not invoked.
6.it is not accept more than one argument.sp accept more
than one argument.

Trigger and procedure:

1.It is run Automatically , sp run it manually.
2.With in a trigger u can call the sp, with in a sp u can
not call the trigger.
3.when u r creating the trigger u have to identify event
and action of your trigger. not possible in sp.
4.Trigger not pass the arguments but sp pass the arguments.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

scope of exception handling in plsql

4 Answers   Wipro,


What is crud stand for?

0 Answers  


Is join and inner join the same?

0 Answers  


Write a query to display the current date in sql?

0 Answers  


What is sql key?

0 Answers  


What is the differnce between view and materialized view

4 Answers   TCS,


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

0 Answers  


What is the use of index in sql?

0 Answers  


What are wait events. Describe the wait event tables.

1 Answers   CTS,


How do you modify a column in sql?

0 Answers  


what is check constraint? : Sql dba

1 Answers  


Does view store data in sql?

0 Answers  


Categories