The most general difference between procedures and functions is that they are invoked differently and for different purposes:
Syntax for routine creation differs somewhat for procedures and functions:
A MySQL extension for stored procedures (but not functions) is that a procedure can generate a result set, or even multiple result sets, which the caller processes the same way as result sets produced by a SELECT statement. However, the contents of such result sets cannot be used directly in expressions. |