Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What is difference between function and procedure?

Answers were Sorted based on User's Feedback



What is difference between function and procedure?..

Answer / rajasekhar

Procedure is used for performing a specific task any number of times in different situations,thats why it is defined as a block of reusable statements to perform a specific task..

There are 2 types of procedures
1. Function procedures
2. Sub procedures

Function procedure can return a value
Sub procedure cannot return a value


Sub procedures execute more faster than function procedures

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / kamal pratap singh

Difference between Functions and Stored Procedure:
1. Function always return value, but procedure may return
value or not.
2. Function return only one value, but procedure return one
value or more than one value.
3. In Function, we can insert a value through parameter
passing like IN. but in procedure, we can insert value using
IN or get a value using OUT or both insert and get value
through single parameter using INOUT.
4. Function are used to perform computation, but procedures
are used to perform business logic.
5. Function are needed to compile when they are called, but
procedures are compiled only one time, so procedures are no
need to compile again. Because the procedure are in pre
compiled format.
6. Function can be called with SQL query but procedure can
not be used with SQl query.

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / archana das

1> A function can only return a value ,but procedure return
multiple values (max 1024).
2> A function is normally used for computations whereas a
procedure is used for executing business logic.

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / d.sharath kumar

function must reaturn a value
procedure ned not be



function can take only input value,but
procedure may take both input & out put parameter

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / rohan

1)FUNCTION doesn't have wait statement WHERE PROCEDURE may
have wait statement..!

2)IN FUNCTION all parameters are Mode "IN" WHERE PROCEDURE
MODE may be IN,OUT,INOUT.

3)Generalize form of an expression (FUNCTION)
PROCEDURE-Generalize Form of Statsment.

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / veera

1) Stored procedure are compiled for first time and compiled
format is saved and executes compiled code when ever it is
called. But function is compiled and executed every time it
is called.

2) Function must return a value but in stored procedure it
is optional.

3) Function takes one input parameter it is mandatory but
stored procedure may take o to n input parameters.

4) Functions can be called from select statement, but stored
procedures can not be called from select statement.

5) We can build logic in functions and we can even break
complex logic in to methods.

6) We can use try catch statements in stored procedures but
in functions we can not use.

7) We can not use insert,delete,update and create statements
in functions but in stored procedures we can use those
statements.

8 ) Functions can have only input parameters but stored
procedure can have input and out put parameters


Thanks and Regards,
VEERA

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / sateesh reddy

Function must contain a return clause in the header.
Procedure do not contain a return clause in the header.

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / sudipta kumar dhal

1.Function is a subprogram that returns a value.

2.Procedure is a subprogram that performs a specific action.


3. Function can return only one value but procedure can return

more than one, or may not return any value.

4. Function can be called from sql statements where as

procedure cannot be called from the sql statements.

5. We can use functions in select statement but we can not use

procedure in select

6.You can have DML(insert,update, delete) statements in a
function.

7.You can have DDL(create,alter,drop) statements in a

procedure.

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / ankit kakadiya

correct

Is This Answer Correct ?    0 Yes 0 No

What is difference between function and procedure?..

Answer / santosh(ssit)

1. Function returns 1 value only. Procedure can return
multiple values.
2. Function can be called from SQL statements where as
procedure can not be called from the sql statements .

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More QTP Interview Questions

Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

0 Answers   Autodesk, EDS, Wipro,


Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com

1 Answers  


How to export data present in Datatable to an ".xls" file?

2 Answers  


i m tryed to use qtp in a user registration form but at the "image enter"part it gives a error when i run the qtp bcz the image is changed every time so it gives a error when i use regukar expreesion fot this it still gives a error value bcoz it reads the image code bt nt reconige the image which i enter in the image verification text box.so hw can i automate qtp for this function.plz give me a answer

1 Answers  


How will you declare a variable in qtp?

0 Answers  






Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

0 Answers   Ordain Solutions,


How you calling actions in qtp?

0 Answers  


Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma

0 Answers  


Which company is better amdocs or techm ???

2 Answers  


i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework

0 Answers   IBM, TCS,


how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

0 Answers  


Using Regular expression in Date format DD/MM/YYYY (0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[12])/([0-9]{4}) in this regular expression year 0000 also accepted.I need atleast any one single digit must be nonzero value (like 0009,1000,0034)

1 Answers  






Categories