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
How to open a new test using quicktest professional?
what QTP Options do you know?
If object is not recognized by qtp but the object is standard object what is your approach?
What is regular expression?
what is the frame work in J-meter?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
Is it possible to switch between recording modes during a test creation?
What are the different recording modes and how do they work?
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
what testplan contents and what test strategy contents,what is the diff b/w them
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))