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 |
What is use of package in pl sql?
What is a behavioral trigger?
i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that.example jan has 4 weeks i need 1st dd for evry wk
What is a loop in sql?
Question: Below is the table city gender name delhi male a delhi female b mumbai male c mumbai female d delhi male e I want the o/p as follows: male female delhi 2 1 mumbai 1 1 Please help me in writing the query that can yield the o/p mentioned above?
Can you selectively load only those records that you need? : aql loader
What are the different sql commands?
When we can declare a column as Unique and Not Null both at the same time. What is the use pf Primary Key then?
2 Answers Accenture, Unisoft Infotech,
What are instead of triggers?
what are dynamic queries in t-sql? : Transact sql
How many clustered indexes can you have?
in materialized view the structure will create immediately or not?