Stored Procedures 1. Create a stored procedure and view global variables mysql> create database yy; Query OK, 1 row affected (0.00 sec) mysql> use yy; Database changed mysql> set @num1=10,@num2=20,@num3=30; //Set global variablesmysql> delimiter $$ mysql> create procedure p(in num1 int,out num2 int,inout num3 int) -> begin -> select num1,num2,num3; -> set num1=100,num2=200,num3=300; -> select num1,num2,num3; -> end $$ Query OK, 0 rows affected (0.00 sec) mysql> delimiter; mysql> call p(@num1,@num2,@num3); Summary 1:
2. Changes in global variable values when calling a stored procedure mysql> select @num1,@num2,@num3; Summary 2:
This is the end of this article about MySQL stored procedure in, out, and inout parameter examples and summary. For more information about MySQL stored procedure in, out, and inout parameters, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Implementation of Docker private library
>>: HTML table markup tutorial (22): row border color attribute BORDERCOLORLIGHT
Installation environment: CAT /etc/os-release Vie...
When you feel that there is a problem with MySQL ...
Adding the rel="nofollow" attribute to ...
1. Add the ul tag in the body first <!-- Unord...
This article example shares the specific code of ...
The previous article introduced the MySql multi-c...
Table of contents 1. What is a template string? 2...
1. Download the installation package Download add...
In the process of database operation, it is inevi...
Effect: When the slideshow moves in one direction...
Drag and drop is a common function in the front e...
This article records the detailed process of down...
This post introduces a set of free Photoshop wire...
Cerebro is an evolution of the Elasticsearch Kopf...
question In the previous article about cross-doma...