Answer Posted / quesanswer
1. Functions must return a value(scalar,inline table or
multi statement table) whereas stored proc may or may not
retun a value.
2.Functions can return a table whereas stored procs can
create a table but can't return table.
3. Stored procs can be called independently using exec
keyword whereas function are called using select statements.
4. Stored procs can be used to change server
configuration(in terms of security-i.e. setting granular
permissions of user rights) whereas function can't be used
for this
5. XML and output parameters can't be passed to functions
whereas it can be with sp's.
6.transaction related statement can be handled in sp whereas
it can't be in function.
7. stored procedures can call a funtion or another sstored
proc similarly a function can call another function and a
stored proc.The catch with function is that no user defined
stored proc can be called.Only extended/system defined procs
can be called.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to turn on or off recycle bin for the session?
Give the constructs of a package, function or a procedure.
Are truncate and delete commands same? If so why?
How to start your 10g xe server?
Explain the use of indexes option in imp command.
How does the on-delete-cascade statement work?
candidate key is subset of super key but not vice-verse explain
What suggestions do you have to reduce the network traffic?
What are joins, explain all types of joins?
How to define an anonymous block?
Explain what are clusters?
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....
How to define an anonymous procedure without variables?
What are the types of partitions in oracle?
What are the attributes that are found in a cursor?