Note
This variable is available starting with V1.4.
Description
explicit_defaults_for_timestamp specifies whether to enable non-standard behavior for the timestamp data type when handling default values and NULL values.
Note
This variable applies only to OceanBase Database in MySQL mode.
Privilege requirements
Query variables
Global level
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
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
systenant can directly modify the value of a global system variable.MySQL user tenants need to have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | ON |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Enable non-standard behavior for the timestamp data type when handling default values and NULL values.
Global level
obclient> SET GLOBAL explicit_defaults_for_timestamp =ON;Session level
obclient> SET explicit_defaults_for_timestamp =ON;
