difference between stored procedure and function?

Answers were Sorted based on User's Feedback



difference between stored procedure and function?..

Answer / m m naidu

A Procedure is a sub-program that performs a specific
action.

A Procedure can be called from PL/SQL Block or from another
Procedure also.


A function is very similar to a Procedure. Both take
arguments, which can be of different modes. Both are
different forms of PL/SQL blocks. Both can be stored in the
database.
A procedure call is a PL/SQL statement by itself, while a
Function call is called as part of an expression. And a
Function must return

Is This Answer Correct ?    7 Yes 0 No

difference between stored procedure and function?..

Answer / vsandhyana

Function can call anywhere in your select query but store
procedure cannot call from the select statement.

store procedure may or may not return values but function
should return value.

Thanks,
Vsandhyana

Is This Answer Correct ?    3 Yes 1 No

difference between stored procedure and function?..

Answer / arkchowdary

PL/SQL------------- It is a named PL/SQL Block.
------------- Which can take 1 or more values.
------------- It accepts Parameters.

Usage-------------- Reusability.
-------------- Precompatibility.


Whereas

Functions----------- It is a named PL/SQL Block.
----------- Which can take 1 or more values.
----------- It must a Returns value by using
return statement.

Is This Answer Correct ?    2 Yes 1 No

difference between stored procedure and function?..

Answer / ravi v

Function returns only 1 value, where as stored procedure
returns mutiple values.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Cognos Interview Questions

Hi Techies, Need your help for achieving this requirement. We have got a requirement to display a report in a page which should diplay max 20 rows but if a report is having totally 17 rows then in the 1st page it has to display 15 rows(divisible by 5) and the other two rows should appear in the next page. Similarly, If a report is having 23 records then in the first page it should display 20 (divisible by 5) and on other page it should display 3 rows. Please advice!

1 Answers   Wipro,


How to generate cubes in cognos?

0 Answers  


what is view? types of views?

3 Answers   HCL,


What are the differences between Cognos 8 and Cognos 7.x version?

2 Answers  


suppose a value prompt contains 100 values and i want to select all values in that prompt....i want ALL option in the value prompt? how can u keep this option in value prompt?

5 Answers   TCS,


What is the difference between the standard and metrics folder?

0 Answers  


wat is called Model dimension?

0 Answers   IBM,


What junk dimension contains?

0 Answers  


How to create measures and Demensions?

2 Answers  


How can I disable the drill-down for the last level of my dimensional hierarchy ????

1 Answers  


What is the report studio?

0 Answers  


What is Fullouterjoin?

0 Answers  


Categories