Difference Between Stored Procedures and Stored Functions

Difference Between Stored Procedures and Stored Functions

Difference Between Stored Procedures and Stored Functions:
Stored Procedures and stored functions are same.But we have some restrictions in stored functions. The following statements or operations are not allowed:

  • Statements that do explicit or implicit commit or rollback.
  • Statements that return a result set. This includes SELECT statements that do not have an INTO var_list clause and SHOW statements. A function can process a result set either with SELECT … INTO var_list or by using a cursor and FETCH statements.
  • FLUSH statements.
  • Recursive statements.
  • Within a stored function , it is not permitted to modify a table that is already being used (for reading or writing) by the statement that invoked the function.

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.