Concepts similar to functions,is to encapsulate a piece of code.,when it comes to executing this piece of code,,You can call this stored procedure to implement the.inside the encapsulated statement body,can be usedIf/else, Case,whileand other control structures.can beSQLProgramming.
In MySQL , the difference between stored procedures and functions ,
One is a different name ,
Two is a stored procedure that has no return value .
What if you want to get the return value? Ok! by out-of-nature variables
To view an existing stored procedure :
Show Procedure Status
To delete a stored procedure
the name of the Drop procedure stored procedure
Call a stored procedure
Call stored procedure name ();
1 declaring variables inside a procedure
2 variable participation operations and simple control statements
3 passing parameters to a stored procedure
4 While Loop
5 Output Type variable
6 Switch statements
7 Do and statements
MySQL Advanced stored procedure