
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
System variables vs User-defined variables in MySQL?
System Variables
The system variables are tightly typed variable. These are also known as global specific variable.
The system variable can be initialized somewhere in global and contains the value of system variables until the server restarts. This value will destroy whenever you restart the MySQL server. The predefined system variable is prefixed with symbol @@.
User-defined Variable
The user defined variable is also known as session-specific variable. It is a type of loosely typed variable which can be initialized somewhere in session and contains the value of user defined variable until session ends. The user defined variable is prefixed with symbol @.
For Example:
@anyVariableName
- Related Articles
- User-defined variables vs Local Variables in MySQL?
- Using User-Defined Variables in MySQL
- System variables vs Local Variables in MySQL?
- Show a MySQL user-defined variables values in the result table?
- Increase database field value by specified percentage using user-defined variables in MySQL
- Member variables vs Local variables in Java
- How can I return a record from a table nearest to a user-defined variables value in MySQL?
- How to use user variables in MySQL LIKE clause?
- What are the properties of MySQL user variables?
- How can user variables be used in MySQL stored procedure?
- How to Display System Variables of MySQL Server?
- Global vs Local variables in Python
- User View vs System View in Operating System
- What is the similarity between prepared statements and MySQL user variables?
- MySQL Environment Variables

Advertisements