Note
This variable is available starting with V1.4.
Description
explicit_defaults_for_timestamp specifies whether to enable nonstandard behavior when handling default values and null values for the timestamp data type.
Note
This variable applies only to OceanBase Database in MySQL mode.
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 values of Global system variables.Session level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of Session system variables.
Modify variables
Global level
systenants can directly modify the values of Global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of Global system variables.
Session level
systenants and all user tenants can directly modify the values of Session system variables for their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | ON |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Enable nonstandard behavior when handling default values and null values for the timestamp data type.
Global level
obclient> SET GLOBAL explicit_defaults_for_timestamp =ON;Session level
obclient> SET explicit_defaults_for_timestamp =ON;