Discussion in 'SQL PL/SQL' started by arivazhagan, Mar 4, 2011.
In what situation will I use procedures AND functions
That is a very preliminary question, Read these articles,
Stored Procedures in PL/SQL
PL/SQL: Functions in Oracle
Procedure can be used to perform some actions (say DML) on the database.(Means you don't want to return any information from the database, though the return type is not must).
Procedure can return values using OUT/ IN OUT parameters.
Function can be used to compute values. (say getting count/sum/ of the values from the database tables and it must have a return type).
And when you want to use it SQL statement (obviously, returning one value) , use Functions.