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
How to write a query with an inner join in oracle?
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
What is a procedure in oracle?
How many types of cluster table in Oracle?
Will you be able to store pictures in the database?explain.
query optmization techniques and quwry analyser+projects+ppts
What is the purpose of tables, private synonyms and public synonyms in Oracle?
Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?
why dont we assign not null constraint as table level constraint.
How can we view last record added to a table?
Explain oracle’s system global area (sga).
How to increment dates by 1 in oracle?
How to define a record variable to store a table row?
How to create additional tablespaces for an new database?
How to create a server parameter file?