Note
This variable is available starting with V4.2.0 GA. It only takes effect in MySQL mode.
Description
sql_select_limit specifies the maximum number of rows that a SELECT statement can return. If a SELECT statement contains a LIMIT clause, the LIMIT clause takes precedence over sql_select_limit. By default, the number of rows returned by a SELECT statement is not limited.
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.
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 statement can return as 100.
Session level
obclient> SET sql_select_limit= 100;Global level
obclient> SET GLOBAL sql_select_limit= 100;