What are main difference between Stored Procedure and
Functions.
Answer Posted / hemanth
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)We can call a function from a procedure, but it is not
possible to call a procedure from a function
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
what is meant by magic query
What is the difference between a primary key & a unique key?
Give the advantages and disadvantages of clusters.
What is coalesce function?
What is background process in Oracle?
How to retrieve data from an cursor to a record?
How do you find out from the RMAN catalog if a particular archive log has been backed-up?
if you ctreate table identity
List the various oracle database objects?
How can you use check constraints for self referential integrity?
How to rename an index in oracle?
Briefly explain what is literal? Give an example where it can be used?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
What is ordinary table in oracle?
What is the use of oracle?