Translation: SET clause (submitted to the MariaDB official Manual), clause mariadb

Source: Internet
Author: User

Translation: SET clause (submitted to the MariaDB official Manual), clause mariadb

This document is the description of the SET in the mariadb official manual.

Original article: https://mariadb.com/kb/en/set/
Https://mariadb.com/kb/zh-cn/set/ I submitted to the MariaDB official manual

Syntax
SET variable_assignment [, variable_assignment] ...variable_assignment:      user_var_name = expr    | [GLOBAL | SESSION] system_var_name = expr    | [@@global. | @@session. | @@]system_var_name = expr

You can use the following syntax to set user variables in any expression:

user_var_name:= expr
Description

SETThe statement can assign values to different variable types that affect the server or client. MySQL of earlier versions adoptsSET OPTIONBut do not agree to useOPTIONOfSETSyntax, which has been removed from MariaDB 10.0.

To assign values to variables based on each query (per-query) (functions starting after MariaDB 10.1.2), see set statement.

To view server system VARIABLES, see show variables.

Server System Variables lists all System Variables.

Example
SHOW VARIABLES WHERE Variable_name LIKE "aria_group_commit%";+----------------------------+-------+| Variable_name              | Value |+----------------------------+-------+| aria_group_commit          | none  || aria_group_commit_interval | 0     |+----------------------------+-------+SET GLOBAL aria_group_commit="HARD";SET GLOBAL aria_group_commit_interval=100;SHOW VARIABLES WHERE Variable_name LIKE "aria_group_commit%";+----------------------------+-------+| Variable_name              | Value |+----------------------------+-------+| aria_group_commit          | hard  || aria_group_commit_interval | 100   |+----------------------------+-------+

Direct assignment:

SELECT (@a:=1);+---------+| (@a:=1) |+---------+|       1 |+---------+SELECT @a;+------+| @a   |+------+|    1 |+------+

 

Back to Linux series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.html
Back to website architecture series article outline: http://www.cnblogs.com/f-ck-need-u/p/7576137.html
Back to database series article outline: http://www.cnblogs.com/f-ck-need-u/p/7586194.html
Reprinted please indicate the source: http://www.cnblogs.com/f-ck-need-u/p/8616226.html

Note: If you think this article is not bad, please click the recommendation in the lower right corner. Your support can stimulate the author's enthusiasm for writing. Thank you very much!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.