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
in a web page How to check and display a particular word from a paragraph?
What are the types of object repositories? Which one is you are using?
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?
What is object repository in qtp?
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
How does qtp recognize objects in aut?
How to start recording using quicktest professional (qtp)?
Explain process of smart Identification in QTP?
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
How many lines of code in each script of QTP?
Does QTP record on Objects created on XWindows Environment?
How to execute a winrunner script in quicktest professional (qtp)?
What is the difference between shared and local object repository?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
What is different command used in command Prompt while using QTP?