what is the differnce between procedure and function?
in both dml operations can work and in procedure through out
parameter you can return value ,then what is the differce?

Answers were Sorted based on User's Feedback



what is the differnce between procedure and function? in both dml operations can work and in proce..

Answer / rajesh venati

1. Procedures are used to perform a particular task.
2. Procedures may or may not return a value, if u want
return a value though the OUT parameter it is possible. It
doesn't contain any RETURN key word.
3. Procedures are not valid in SELECT statement.



1. Functions are used for computation purpose.
2. Function must and should be return a value.
3. We can execute function in a SELECT statement.
-- If u use OUT or IN OUT parameters or perform any DML
operations on functions it is not valid in SELECT statement.

Is This Answer Correct ?    4 Yes 0 No

what is the differnce between procedure and function? in both dml operations can work and in proce..

Answer / dinakar

Though Procedure returns a value through OUT parameter, it
cannot be used in SELECCT statement. Whereas a function can
be called in SELECT statement.

Is This Answer Correct ?    2 Yes 0 No

what is the differnce between procedure and function? in both dml operations can work and in proce..

Answer / gavini srikanth

function can return value,procedure may or may not return
value,through procedures can store images

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

What are the usage of SAVEPOINTS?

5 Answers  


What is out parameter used for eventhough return statement can also be used in pl/sql?

0 Answers  


what are the properties and different types of sub-queries? : Sql dba

0 Answers  


What is the diff between Truncate table / delete <table name> purge

3 Answers   TCS,


What is difference between rank () row_number () and dense_rank () in sql?

0 Answers  






Can 2 queries be executed simultaneously in a distributed database system?

0 Answers  


How does postgresql compare to oracle/db2/ms sql server/informix?

0 Answers  


what are the demerits of sql?

1 Answers  


What is a system versioned table?

0 Answers  


When we can declare a column as Unique and Not Null both at the same time. What is the use pf Primary Key then?

2 Answers   Accenture, Unisoft Infotech,


i have table T!. A B C D NULL 1 2 3 4 NULL 5 6 7 8 NULL 9 10 11 12 NULL. I WANT COUNT OF NULL VALUES IN TABLE. WRITE A QUERY.

14 Answers   iGate, Wipro,


How to add Foreign key in a table after the creation of the table?

5 Answers   Satyam,


Categories