| |
GeekInterview.com > Interview Questions > Oracle > SQL
| Print | |
| Question: Difference between procedure and function.
Answer:
Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression. |
| April 04, 2007 09:59:06 |
#8 |
| sayeed321in |
Member Since: April 2007 Total Comments: 4 |
RE: Difference between procedure and function. |
Difference between functions and procedures: 1) DML is allowed in the function if it is not called from a DML (select) statement.but it is absolutely allowed when called from a procedure or a function which is not called from any DML
2) you can have a return statement in function where as procedure does not have return statement.
3) You can invoke a function from a DML.but the same is not possible with a procedure.
This is what the difference i feel.......If u know anything else then let me know. |
| |
Back To Question | |