In the MySQL documentation, MySQL variables can be divided into two categories, namely system variables and user variables. However, according to actual applications, they are further divided into four types, namely local variables, user variables, session variables and global variables. 1. Local variables MySQL local variables can only be used in begin/end statement blocks, such as begin/end statement blocks in stored procedures. Its scope is limited to this statement block.
2. User variables MySQL user variables. User variables in MySQL do not need to be declared in advance. When using them, just use "@variable name" directly. Its scope is the current connection.
Session variables MySQL session variables, the server maintains a series of session variables for each connected client. Its scope is limited to the current connection, that is, the session variables in each connection are independent.
4. Global variables MySQL global variables, global variables affect the overall operation of the server, when the service starts, it initializes all global variables to default values. To modify global variables, you must have super privileges. Its scope is the entire life cycle of the server.
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue3.0 implements encapsulation of checkbox components
>>: Solve the problem of IDEA configuring tomcat startup error
Linux file permissions First, let's check the...
Autotrash is a command line program that automate...
Text Shadow text-shadow: horizontal offset vertic...
Table of contents Using slots in Vue: slot Scoped...
This article shares the installation and configur...
This article example shares the specific code of ...
When associating two tables, a foreign key could ...
Docker installs mysql docker search mysql Search ...
Preface What is data type conversion? The default...
Step 1: Change DATABASES in setting.py # Configur...
<body> <div id="root"> <...
CSS writing order 1. Position attributes (positio...
To achieve the following goals: Mysql database wi...
Previously, react.forwardRef could not be applied...
This article shares the specific code of jQuery t...