what is the differnce between procedure and function?
in both dml operations can work and in procedure through out
parameter you can return value ,then what is the differce?
Answers were Sorted based on User's Feedback
Answer / rajesh venati
1. Procedures are used to perform a particular task.
2. Procedures may or may not return a value, if u want
return a value though the OUT parameter it is possible. It
doesn't contain any RETURN key word.
3. Procedures are not valid in SELECT statement.
1. Functions are used for computation purpose.
2. Function must and should be return a value.
3. We can execute function in a SELECT statement.
-- If u use OUT or IN OUT parameters or perform any DML
operations on functions it is not valid in SELECT statement.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / dinakar
Though Procedure returns a value through OUT parameter, it
cannot be used in SELECCT statement. Whereas a function can
be called in SELECT statement.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / gavini srikanth
function can return value,procedure may or may not return
value,through procedures can store images
Is This Answer Correct ? | 0 Yes | 3 No |
What are the usage of SAVEPOINTS?
What is out parameter used for eventhough return statement can also be used in pl/sql?
what are the properties and different types of sub-queries? : Sql dba
What is the diff between Truncate table / delete <table name> purge
What is difference between rank () row_number () and dense_rank () in sql?
Can 2 queries be executed simultaneously in a distributed database system?
How does postgresql compare to oracle/db2/ms sql server/informix?
what are the demerits of sql?
What is a system versioned table?
When we can declare a column as Unique and Not Null both at the same time. What is the use pf Primary Key then?
2 Answers Accenture, Unisoft Infotech,
i have table T!. A B C D NULL 1 2 3 4 NULL 5 6 7 8 NULL 9 10 11 12 NULL. I WANT COUNT OF NULL VALUES IN TABLE. WRITE A QUERY.
How to add Foreign key in a table after the creation of the table?