Overview
The explicit_defaults_for_timestamp clause specifies whether to enable non-standard behavior for the TIMESTAMP data type when handling default and null values.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Bool |
| Default Value | ON |
| Value range |
|
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Configuration example
The TIMESTAMP data type enables nonstandard behavior when handling default and null values.
Effective globally
obclient> SET GLOBAL explicit_defaults_for_timestamp =ON;Session Validity Period
obclient> SET explicit_defaults_for_timestamp =ON;