Note
This variable is available starting with V4.2.0 GA. It takes effect only in MySQL mode.
Description
sql_select_limit specifies the maximum number of rows that a SELECT query can return. If a SELECT query contains a LIMIT clause, the value of the LIMIT clause has a higher priority than sql_select_limit. By default, the number of rows returned by a SELECT query is not limited.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of a global system variable.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the value of a session system variable.
Modify variables
Global level
The
systenant can directly modify the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
The
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 9223372036854775807 |
| Value range | [0, 9223372036854775807] |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Specify the maximum number of rows that a SELECT query can return as 100.
Session level
obclient> SET sql_select_limit= 100;Global level
obclient> SET GLOBAL sql_select_limit= 100;
