adspace


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 many tables will create when we create table, what are they? : Sql dba

1144


Does group by remove duplicates?

1112


Is primary key clustered index?

1019


define sql insert statement ? : Sql dba

1098


If a cursor is open, how can we find in a pl/sql block?

1238


how to escape special characters in sql statements? : Sql dba

1114


How do I remove duplicates in two columns?

1187


What is your daily office routine?

2346


Is inner join faster than left join?

1277


what are all the common sql function? : Sql dba

1131


what is schema? : Sql dba

1147


what is dbms? : Sql dba

1061


What is the current version of postgresql?

1178


what is collation? : Sql dba

1229


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2091