> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-structure/operators/assignment-operators.md).

# Assignment Operators

{% columns %}
{% column %}
{% content-ref url="/pages/oDG1WwX9fFhwe7SaR5a0" %}
[Assignment Operator (:=)](/docs/server/reference/sql-structure/operators/assignment-operators/assignment-operator.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Assign a value to a user-defined or local variable with the := operator, which, unlike =, can be used in any context.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/7UFusCy4nZq9CyiCkFEn" %}
[Assignment Operator (=)](/docs/server/reference/sql-structure/operators/assignment-operators/assignment-operators-assignment-operator.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Assign a value with the = operator, which doubles as a comparison operator and is valid for assignment only in SET statements and the SET clause of UPDATE.
{% endcolumn %}
{% endcolumns %}
