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?
Answer Posted / 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 |
Post New Answer View All Answers
What is an inconsistent dependency?
Which one is better sql or oracle?
How do you write an index?
Can we use join in subquery?
What is view explain with example?
What is delete command in sql?
Is sql developer case sensitive?
Can we write dml inside a function in sql server?
Can 2 queries be executed simultaneously in a distributed database system?
Does pl/sql support create command?
What is PL/SQL Records?
What is a native sql query?
How many commands are there in sql?
Do ddl statements need commit?
What sql does db2 use?