What is difference between a PROCEDURE & FUNCTION ?

Answers were Sorted based on User's Feedback



What is difference between a PROCEDURE & FUNCTION ?..

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

What is difference between a PROCEDURE & FUNCTION ?..

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

What is difference between a PROCEDURE & FUNCTION ?..

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

What is difference between a PROCEDURE & FUNCTION ?..

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

What is difference between a PROCEDURE & FUNCTION ?..

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

What is difference between a PROCEDURE & FUNCTION ?..

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

Post New Answer

More SQL PLSQL Interview Questions

difference between cursor and procedure in a package

3 Answers   PCS,


Can you skip header records while loading? : aql loader

0 Answers  


Write a sql query to get the third highest salary of an employee from employee_table?

0 Answers  


What is the use of a view in sql?

0 Answers  


can we create index on index?

7 Answers   iFlex, Symphony,


Is crud a cuss word?

0 Answers  


What are the advantages of pl sql over sql?

0 Answers  


What is normalization in a database?

0 Answers  


What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no difference. 2. A PRIMARY KEY cannot be declared on multiple columns. 3. A UNIQUE CONSTRAINT cannot be declared on multiple columns. 4. A table can have multiple PRIMARY KEYS but only one UNIQUE CONSTRAINT. 5. A table can have multiple UNIQUE CONSTRAINTs but only one PRIMARY KEY.

7 Answers   Satyam,


Like shown below i have 3 columns(Name,No,Address). The values in name column i want to modity. Requirement : Keep only once space between two words (Fname,Lname) in the Name column. For this what is the query? Please answer me. Advance Thanks. Name No Address Reference manoj kumar kumar raja vinzay kumar rajendra prasad gowri nath -- -- --

5 Answers  


Which are the different character-manipulation functions in sql?

0 Answers  


What is the difference between cross join and natural join?

0 Answers  


Categories