Note
This variable was introduced in OceanBase Database V1.4.
Description
lower_case_table_names specifies whether object names are case-sensitive for storage and comparison.
Applicability
This variable is applicable to only OceanBase Database in MySQL mode. It takes effect only on the names of databases and tables.
Privilege requirements
Query variables
You can execute the
SHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the values of Global system variables as thesystenant or any user tenant.Modify variables
After a tenant is created, you cannot modify the value of this variable by using an SQL statement.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 1 |
| Value range | 0: Object names are stored in the specified case and compared in a case-sensitive manner.1: Object names are stored in lowercase and compared in a case-insensitive manner.2: Object names are stored in the specified case and compared in a case-insensitive manner. |
| Effective scope | Global |
| Modifiable | No. You can set the variable when you use the CREATE TENANT statement to create a tenant. After the tenant is created, you cannot modify the variable by executing SQL statements. |
Examples
Set the lower_case_table_names variable to 0 when you use the CREATE TENANT statement to create a tenant.
obclient> CREATE TENANT IF NOT EXISTS t1 zone_list = ('zone1'), primary_zone = 'zone1', resource_pool_list = ('pool1') SET ob_compatibility_mode = 'mysql',lower_case_table_names = 0;