What is difference between function and procedure?
Answer Posted / pranjal
Bot 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 ? | 205 Yes | 17 No |
Post New Answer View All Answers
assume i have few url link how will i dynamically call then using descriptive programming?
Does quicktest professional (qtp) is unicode compatible?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
How many add-ins comes by default with quicktest professional (qtp)?
how will you check how many members visited the website www.infosys.com?
Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.
How many types of parameters are available in quicktest professional?
What is file database?
What is expert view and keyword view?
QTP script is not working on other's machine..
Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also
How to use debug tools?
Please Don't mind .i want in detail the real time process i.e in each document what it contains.
Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?
What is object spy in quicktest professional (qtp)?