What is the difference between a stored procedure and a function in MySQL?
- A A function must return a value and can be used in expressions; a procedure need not
- B A procedure must return a value; a function need not
- C There is no difference
- D Procedures can only be used by administrators
Answer
A function must return a value and can be used in expressions; a procedure need not
Functions return a single value and can appear inside SELECT statements. Procedures are invoked with CALL and may return results via OUT parameters or result sets.





