What is difference between function and procedure?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

1607


What are advantages of test automation?

663


How to connect to a database?

577


How to create Reusable and Multiple Actions?

1705


Explain the concept of object repository & how qtp recognizes objects?

566






What are the differences between qtp and winrunner?

527


What are the different attribute used with regular expression?

531


If I give some thousand tests to execute in two days what do you do?

580


Hi ,Can any one pleas explain how to test splash objects using QTP?

1903


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?

1421


who QTP recognizes the object stored in object repository?

1657


I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error

2347


descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button

1806


Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com

1494


What is business process testing(bpt) in qtp?

691