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
Preface This article mainly introduces the soluti...
Translucent border Result: Implementation code: &...
What are the lifecycle functions of React compone...
1. Download docker online yum install -y epel-rel...
This time we will mainly learn about layout, whic...
1. Download First of all, I would like to recomme...
This article example shares the specific code of ...
Run cmd with administrator privileges slmgr /ipk ...
This article uses examples to describe MySQL tran...
When we do CSS web page layout, we all know that i...
Kubernetes supports three types of authentication...
Here we only focus on the installation and use of...
Table of contents Bubble Sort Selection Sort Inse...
Table of contents 1.kvm deployment 1.1 kvm instal...
Table of contents 1. What is a prototype? 2. Prot...