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

What is bind variable in pl sql?

0 Answers  


What does plvtab enables you to do when you showthe contents of pl/sql tables?

0 Answers  


What is primary key in db?

0 Answers  


What is over () in sql?

0 Answers  


Which one of the following is a reason that an INSERT statement might cause an error instead of executing correctly? 1. The INSERT statement was attempting to insert a record into a view that was created from more than one table. 2. The INSERT statement was attempting to insert a record using a combination of constants and values from an existing table. 3. The INSERT statement was attempting to insert a record with a non-NULL value into a table that has that column defined as NULL. 4. The INSERT statement was attempting to insert a record into a table by selecting a record from that same table. 5. The INSERT statement was attempting to insert a record into a view rather than a table.

1 Answers   Sonata,






Explain constraints in sql?

0 Answers  


What is composite primary key in sql?

0 Answers  


What are advantages of Stored Procedures?

3 Answers   Satyam,


What is the difference between rename and alias?

0 Answers  


How would you go about increasing the buffer cache hit ratio? 0. Explain the difference between a hot backup and a cold backup and the benefits associated with each 1. You have just had to restore from backup and do not have any control files. How would you go about bringing up this database? 2. How do you switch from an init.ora file to a spfile? 3. Explain the difference between a data block, an extent and a segment. 4. Give two examples of how you might determine the structure of the table DEPT. 5. Where would you look for errors from the database engine? 6. Compare and contrast TRUNCATE and DELETE for a table. 7. Give the reasoning behind using an index. 8. Give the two types of tables involved in producing a star schema and the type of data they hold. 9. What type of index should you use on a fact table? 10. Give two examples of referential integrity constraints. 11. A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables? 12. Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each. 13. What command would you use to create a backup control file? 14. Give the stages of instance startup to a usable state where normal users may access it. 15. What column differentiates the V$ views to the GV$ views and how? 16. How would you go about generating an EXPLAIN plan?

2 Answers  


What is cursor in pl sql?

0 Answers  


What is nosql vs sql?

0 Answers  


Categories