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 is applicable only to OceanBase Database in MySQL-compatible mode.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible 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-compatible 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 must 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 in their own tenant.
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;