Question: what is the difference between stored procedure and function in mysql?
Answer: Stored procedure always returns an integer value of zero by default. Whereas function return types could be scalar or table or table values. Stored procedures have a precompiled execution plan, where as functions are not. ... A Function can be used in the SQL queries while a procedure cannot be used in SQL queries.