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

after tell procedure whole code he asked can i write the same way in a function

3 Answers  


What is the difference between a subquery and a join?

1 Answers  


what is constraining table?

2 Answers  


what is innodb? : Sql dba

1 Answers  


what is hash join

1 Answers   NCR,


When do we use triggers?

1 Answers  


What is the difference between count 1 and count (*) in a sql query?

1 Answers  


What is sql and explain its components?

1 Answers  


What is bulk compiling in pl/sql.?

1 Answers   MCN Solutions,


What are tables and fields in the database?

1 Answers  


What are the advantages of VIEW?

5 Answers  


When is the update_statistics command used?

1 Answers  


Categories