Explain the difference between procedure and function in MySQL?
Functions are generally used for computations, but procedures are usually used for executing business logic.
The function returns only 1 value, but the procedure can return multiple values.
The function can be called directly by SQL statement like select functionName from dual, but procedures cannot be called directly.
The function can be used in the SQL Query directly, but a procedure can not be used in a SQL query.