Translation: SET clause (submitted to MARIADB official manual)

Source: Internet
Author: User

This article is the Official Handbook of MARIADB: Set translations.

Original:https://mariadb.com/kb/en/set/
I submit it to MARIADB official manual:https://mariadb.com/kb/zh-cn/set/

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

User variables can be set in any expression using the following syntax:

user_var_name:= expr
Describe

SETStatements can be assigned to different variable types that affect the service side or client. The old version of MySQL was used, but was deprecated with syntax and was SET OPTION OPTION SET removed in version 10.0 of MARIADB.

To assign a value to a variable based on each query (Per-query) (function starting after mariadb 10.1.2), see SET STATEMENT.

To view server-side system variables, see SHOW VARIABLES.

The Server system Variables lists all of the 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=; 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 Site 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
Reprint Please specify source: http://www.cnblogs.com/f-ck-need-u/p/8616226.html

Note: If you think this article is not bad please click on the lower right corner of the recommendation, your support can inspire the author more enthusiasm for writing, thank you very much!

Translation: SET clause (submitted to MARIADB official manual)

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.