0% found this document useful (0 votes)
7 views

11. Procedure vs Function

The document outlines the key differences between stored procedures and user-defined functions in programming. It highlights that functions must return a value while procedures cannot, and that functions can be called from SQL whereas procedures cannot. Additionally, it notes that both can return data through OUT and IN OUT parameters, but their return statements serve different purposes.

Uploaded by

patelsoham.797
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

11. Procedure vs Function

The document outlines the key differences between stored procedures and user-defined functions in programming. It highlights that functions must return a value while procedures cannot, and that functions can be called from SQL whereas procedures cannot. Additionally, it notes that both can return data through OUT and IN OUT parameters, but their return statements serve different purposes.

Uploaded by

patelsoham.797
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Unit-3 (Stored procedures and User defined functions)

 Procedures VS Functions
 Here are a few more differences between a procedure and a function:
 A function MUST return a value
 A procedure cannot return a value
 Procedures and functions can both return data in OUT and IN OUT parameters
 The return statement in a function returns control to the calling program and
returns the results of the function
 The return statement of a procedure returns control to the calling program and
cannot return a value
 Functions can be called from SQL, procedure cannot
 Functions are considered expressions, procedure are not

You might also like