What is difference between function and procedure?
Answer Posted / santosh(ssit)
Both functions and procedures can return values. Apart from
this following are the differences
1) Functions are used for computations where as procedures
can be used for performing business logic
2) Functions MUST return a value, procedures need not be.
3) You can have DML(insert,update, delete) statements in a
function. But, you cannot call such a function in a SQL query..
eg: suppose, if u have a function that is updating a table..
you can't call that function in any sql query.
- select myFunction(field) from sometable; will throw error.
4) Function parameters are always IN, no OUT is possible
5) Function returns 1 value only. procedure can return
multiple values(max. 1024)
6) Stored Procedure :supports deffered name resoultion
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 deffered name resolution.
Stored procedure returns always integer value by default
zero. where as function return type could be
scalar or table or table values(SQL Server).
Stored procedure is pre compiled exuction plan where as
functions are not.
7) A procedure may modifiy an object where a function can
only return a value.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)
Why we load add-ins in qtp?
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
what is impact analysis on regression testing?
Discuss quicktest professional environment?
Give the syntax to load function at run time.
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
How to open a new test using quicktest professional (qtp)?
What is expert view and keyword view?
what is object and child object.. explain ..if possible give some example for better understanding ..
am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)
How to check feasibility of the appliction?in automation testing?
i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api
Difference between action & Reusable action?
how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?