What is difference between function and procedure?
Answer Posted / anurag arun edlabadkar
Question: Difference Between Procedure &
Function?
1). Both functions and procedures can return values.
2). Both can return multiple values, like in the case of
procedure it can return multiple values using OUT and INOUT
type parameter, while in case of function used in Report 6i,
using "PLACEHOLDER COLUMN" you can return multiple values.
3). "Complete Reference" Book say that function can use
parameters as IN, OUT, and INOUT as same as in Procedure.
/*
create function syntax
The syntax for the create function command is more
complicated than the syntax for the create procedure
command. At a high level, the syntax is
create [or replace] function [schema.] function
[(argument [in | out | inout ] [nocopy] datatype
[, argument [in | out | inout ] [nocopy]
datatype]...
)]
return datatype
*/
4). Function returns value using "Return" Key Word, where
same key word can be used in Procedure to Terminate the
program, with immidiate effect.
5). Functions are used for computations where as procedures
can be used for performing business logic.
6). Functions MUST Return a value, procedures need not be.
7). You can have DML(insert,update, delete) statements in a
function.
8). You can call a function in a Select Query where as
not Procedure.
9). Function returns 1 value only where as Procedure can
return
multiple values(max. 1024)
10). A procedure may modifiy an object where a function can
only return a value.
Is This Answer Correct ? | 20 Yes | 7 No |
Post New Answer View All Answers
I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2
Explain the checkpoint in qtp?
How QTP support all types of applications (platforms)?
How to use Environment parameterization? Explain with an example.
What is expert view in qtp?
what testplan contents and what test strategy contents,what is the diff b/w them
Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..
Discuss the QTP Environment?
How to test fly out menu in qtp?
Which environments does qtp support?
what could go wrong with test automation?
Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.
They asked by using qtp recording writing scripting
Diff b/w test scenario's and test Procedures?
Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance