Lecture 63: Core concepts and cases of parameter passing in MySQL stored procedure variables

1. Stored procedure parameter passing

When creating a stored procedure, you can pass in some parameters in the parentheses after the stored procedure name. For example, pass in a variable. This variable can be used to perform conditional judgments, reference variable values, etc. in the stored procedure. You only need to call the stored procedure. Just assign a value to this variable.

image-20220614204222319

Parameter passing is the actual passing of parameters. Like other development languages, parameter passing means passing a value to a set of codes through positional variables. This set of codes can reference the variable to perform a series of operations.

When using parameters in a stored procedure, they are usually divided into the following three types:

  • IN type:
    • IN type parameters are used as input parameters, which means that a certain value or variable is passed to the stored procedure for use, similar to shell

Guess you like

Origin blog.csdn.net/weixin_44953658/article/details/133982208