Saturday, July 24, 2010

What is difference between Stored Procedures Vs Functions?

                   Stored Procedures

                                           Functions

Can return zero or n values

Can return one value which is mandatory

Have input and output parameters

Have only input parameters

Allows SELECT as well as DML and DDL statements

Allow only SELECT statement in it

Cannot be called from function

Can be called from procedure

Exception can be handled by try-catch block

try-catch block cannot be used

Allows transaction management

Transaction management is not allowed

Cannot be invoked from a SELECT statement

Can be embedded in a SELECT statement

No comments:

Post a Comment


All Rights Reserved @ Raju Das