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
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
If I give some thousand tests to execute in two days what do you do?
Explain the concept of object repository?
How many types of parameters are available in quicktest professional?
Please Don't mind .i want in detail the real time process i.e in each document what it contains.
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
With what extension you can save the list of tests in a file to run in test batch runner?
I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
What are the different properties of an web object
How to use checkpoints in qtp ?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
Is it possible to use two instances of UFT on the same machine? If not why?
diff between qtp versions from 8.5
Explain the new feature of UFT regarding the export of test results?