What is difference between function and procedure?
Answer Posted / gunesh
1.Function is mainly used in the case where it must return
a value. Where as a procedure may or may not return a value
or may return more than one value using the OUT parameter.
2.Function can be called from sql statements where as
procedure cannot be called from the sql statements.
3.Functions are normally used for computations where as
procedures are normally used for executing business logic.
4.You can have DML (insert, update, delete) statements in a
function. But, you cannot call such a function in a SQL
Query.
5.A Function returns 1 value only. Procedure can return
multiple values (max 1024).
6.Stored Procedure: supports deferred name resolution.
Example while writing a stored procedure that uses table
named tabl1 and tabl2 etc...But actually not exists in
database is allowed only in during creation but runtime
throws error Function won’t support deferred name
resolution.
7.Stored procedure returns always integer value by default
zero. whereas function return type could be scalar or table
or table values
8.Stored procedure is precompiled execution plan where as
functions are not.
9.A procedure may modify an object where a function can
only return a value The RETURN statement immediately
completes the execution of a subprogram and returns control
to the caller.
| Is This Answer Correct ? | 13 Yes | 6 No |
Post New Answer View All Answers
what is clean sweep?
Whether qtp 9.0 supports Test director8.0
What is the difference between qtp and selenium?
what is meant by source control?
in my application,validation message has in japanise language.how to validate this message is appears properly or not
Mention the different actions types of qtp.
What is keyword view in qtp?
How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
what are all the fileds present in object repository?
Is it possible to change the property value at runtime? How it is possible?
1. wat are the main diff b/w QTP 8.0 AND QTP 9.2 ( not user interface) 2. wat is the meaning of Keyword in keyword driven frame work? 3. how u will handle the unknown errors while exucution. (not recovery scenario)
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
how will you check how many members visited the website www.infosys.com?
Hai anyone please "Explain about Framework in QTP?"
How the exception handling can be done using quicktest professional (qtp)?