Differences between Mysql stored procedures and functions stored procedures are a collection of user-defined SQL statements involving tasks of specific tables or other objects. You can call stored procedures, A function is usually a database-defined method. It receives parameters and returns some type of values without involving specific user tables. There are several differences between stored procedures and functions at www.2cto.com: 1) In general, the functions of stored procedures must be more complex, and the functions of functions are more targeted. Stored procedures are powerful and can be used to perform a series of database operations, including modifying tables. User-defined functions cannot be used to perform a group of operations to modify the global database status. 2) For stored procedures, parameters such as record sets can be returned, while functions can only return values or table objects. A function can return only one variable, while a stored procedure can return multiple variables. Stored procedure parameters can be IN, OUT, And INOUT, while functions can only have IN classes ~~ The stored procedure declaration does not require a RETURN type, but the RETURN type must be described during the function declaration. The function body must contain a valid RETURN statement. 3) stored procedures, you can use undefined functions, and do not allow built-in undefined functions in the User-Defined Function body. 4) The stored procedure is generally executed as an independent part (EXECUTE statement execution), and the function can be called as a part of the query statement (SELECT call ), because a function can return a table object, it can be located behind the FROM keyword in the query statement. Stored procedures are unavailable in SQL statements, but functions can be used.