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 takes precedence over the value of sql_select_limit. By default, no limit is set on the number of rows returned by a SELECT query.
Privilege requirements
Query variables
Global level
systenants 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
systenants 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
systenants can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenants and all user tenants can directly modify the value of a session system variable of their own tenant.
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
Set the maximum number of rows that a SELECT query can return to 100.
Session level
obclient> SET sql_select_limit= 100;Global level
obclient> SET GLOBAL sql_select_limit= 100;