What is difference between a PROCEDURE & FUNCTION ?
Answers were Sorted based on User's Feedback
Answer / anil kumar jampana
sorry, we can use in,inout,out parameters in functions also.
one more diff. we can use functions in normal sql queries
but we cann't use procedures in sql queries....
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / ace
A function is a special kind of procedure. A function
returns a value in its name. A function can return more
than one value if it returns a ref cursor.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / naresh bs
The main difference is that, a procedure may return and
value but a function has to return a value.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pankaj mehra
Well the main difference between procedures and function is
that the procedure may/may not return any value.it can
return more than one value also.
but functions can return only one value at a time and it
must have return keyword inside the function
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / surajit pathak
We can use in,inout,out parameters in functions also.
The most important difference is we can use functions in
normal sql queries if it is not containing any out
parameters.
but we cann't use procedures in sql queries....
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / chandrasekar.ramasamy
Function accepts only in parameter but procedure accepts
in,out and inout
Function mostly used for mathamatical calculations
But procedure used to execute business logics
| Is This Answer Correct ? | 0 Yes | 11 No |
Can we edit a view in sql?
Create a procedure to delete certain records from a table and display the total number of records deleted in this process. (Condition for deletion can be of ur choice, for instance delete all records where eid='')
how to fetch alternate records from a table? : Sql dba
What is a merge query?
What is rule base and cost base optimizer?
What is scope of pl sql developer in future?
Query for second maximum salary in each in each department
15 Answers DST Global Solutions, TCS,
Why do we need databases?
Explain how to use transactions efficiently : transact sql
What does cursor do in sql?
What are the different parts of a package?
What is scalar data type in pl sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)