What is difference between function and procedure?
Answer Posted / vijay
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 can not 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. 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 wont support deferred name resolution.
7.Stored procedure returns always integer value by default
zero. where as 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 ? | 3 Yes | 0 No |
Post New Answer View All Answers
what is test scheduleling?
What is QTP scenario.
What is Port testing. Whhen will you perform?
What are the challenges you faced during you entire life automation ?
What is the virtual object?
How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?
can any one say that where we can download the QTP trail version ??????????
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
What are the different ways to invoke an application using QTP?
what type of framework u r using in ur organization
How to test the login page in different ways in automation testing and i need code?
1.How to record ,capture and also script to capture the close buttons. 2.How to record ,capture and also script to capture the options ---File ->save and File ->close in a browser and PDF files. 3.How to compare the Excel sheet values in a report using QTP scripting. 4.How to compare 2 PDf reports using QTP scripts as well reording. 5.How to compare 2 Excel reports using QTP scripts as well reording. 6.How to save a PDF report to a folder and then translate the report to an Excel type of report and compare that Excel Report with an other excel report. Please clarify me
What is ‘object spy’ and what is the function of object spy in qtp?
How you can decide which type of object repository you have to use?
Discuss quicktest professional environment?