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 is meant by forward declaration in functions?

4 Answers   TCS,


There is a sequence with min value 100. I want to alter this sequence to min value as 101. If the table has already data in the sequence column as 100,101,102... Is it possible to do so ?

4 Answers   IBM,


what are the difference between clustered and a non-clustered index? : Sql dba

0 Answers  


how to drop an existing table in mysql? : Sql dba

0 Answers  


How many disk partitions should I have?

0 Answers  






what are different types of keys in sql?

0 Answers  


What is the differnce between view and materialized view

4 Answers   TCS,


how to check myisam tables for errors? : Sql dba

0 Answers  


How do you handle exceptions. Give the syntax for it?

1 Answers   BCL, Microsoft,


How do I write a cron which will run a sql query and mail the results to agroup?

0 Answers  


What does t sql mean?

0 Answers  


Define a temp table?

0 Answers  


Categories