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 are the different types of synonyms?
How to create a new view in oracle?
Can we call procedure inside function in oracle?
What is a cursor and what are the steps need to be taken?
What is meant by a deadlock situation?
How to execute a stored procedure in oracle?
How to display employee records who gets more salary than the average salary in the department?
How to get a list of all background sessions in the database?
Explain about functional dependency and its relation with table design?
What is Java Pool in Oracle?
Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
How to define an oracle sub procedure?
How to delete a column in an existing table?
how to make an oracle object
How to run the anonymous block again?