what is difference between procedure and function

Answer Posted / p.rajasekar

Function:
1.Function Always Return values
2.We can call the function in select Query
3.We can return more than one values using Out put
paramaetes
4.Genrally we can use function as calculatevalues
5.We can insert,update or delte value with the help
function in a select query
Procedure:
1.Procedure doesnot always return value
2.We can't call procedure in Select query
3.We can return more than one value using Out put
parameters in procedure
4.Genarally procudures are using as business logic

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you rank data in sql?

729


When can we use the where clause and the having clause?

817


Can instead of triggers be used to fire once for each statement on a view?

761


What is dml with example?

806


How can the performance of a trigger be improved?

836


How do I run a sql query?

797


What is difference between hql and native sql?

827


What are the types of queries in sql?

790


What is type and rowtype in pl sql?

794


What does count (*) do in sql?

784


What is sql mysql pl sql oracle?

836


What if we write return in procedure?

1039


Mention what problem one might face while writing log information to a data-base table in pl/sql?

917


How do I make my sql query run faster?

723


Can we join same table in sql?

786