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
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
How to capture all the data of a webtable, weblist and combolist using QTP?
What is the registration process and examination fees?
what are the mandatory properties for a tex boxc (scenario?)
How to build scripts that access data from external sources?
How to import a test case present in ".xls" file to TD under a Test set?
What is a quick test professional?
How does you pass optional arguments in qtp?
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.
What is Test Fusion Report in QTP?
regular expression in qtp standar check point for months from accepting months from january to december only
diff between qtp versions from 8.5
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
Hi All, How to get repeated word in string . Thanks Balaji