:=

USAGE

variable := value

Value Name

Description

variable

The variable that receives the value

value

The value to assign

DETAILS

The := operator assigns a value to a variable.

A variable name is introduced with one preceding @ character to indicate that it is a session variable.

A variable name is introduced with two preceding @ characters to indicate that it is a global variable.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT @a := (@b := 5) + 2, @b;
+---------------------+------+
| @a := (@b := 5) + 2 | @b   |
+---------------------+------+
|                   7 | 5    |
+---------------------+------+
SELECT @b + @a := 1, @a;
+--------------+----+
| @b + @a := 1 | @a |
+--------------+----+
|            6 |  1 |
+--------------+----+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES