📜  MySQL 存储过程与函数 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:46.133000             🧑  作者: Mango

代码示例1
The most general difference between procedures and functions is that they are invoked differently and for different purposes:

A procedure does not return a value. Instead, it is invoked with a CALL statement to perform an operation such as modifying a table or processing retrieved records.
A function is invoked within an expression and returns a single value directly to the caller to be used in the expression.
You cannot invoke a function with a CALL statement, nor can you invoke a procedure in an expression.