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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to load data with sql*loader?

643


how can we repair a mysql table? : Sql dba

622


What are the 3 modes of parameter?

793


Explian rowid, rownum? What are the psoducolumns we have?

667


Explain aggregate functions are available there in sql?

639






How many postgresql users are there, worldwide?

671


How to select 10 records from a table?

731


I need a function for a train ticket reservation please answer it thanks in advance

663


What is row_number () in sql?

630


Is left join faster than join?

644


What is an oracle stored procedure?

678


Is a table valued function object?

679


What is a temporal data type?

679


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

733


Explain the structure of pl/sql in brief.

696