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
History of ZFS The Z File System (ZFS) was develo...
1. Download address: http://dev.mysql.com/downloa...
1. Initialize data DROP TABLE IF EXISTS `test_01`...
My97DatePicker is a very flexible and easy-to-use...
Preface In general development, images are upload...
mysql records time-consuming sql MySQL can record...
Recently, I encountered a database with the follo...
The crontab command is used by Unix and Linux to ...
1. Nginx service foundation Nginx (engine x) is d...
Solution to MySql service disappearance for unkno...
This article shares the specific code of Vue to i...
If you want to solve the slow problem once and fo...
1. Tcl script file circle.tcl code comments #Set ...
When it comes to bionic design, many people will t...
mysql gets all dates or months in a time period 1...