[doc] add description ofd[DEFAULT CURRENT_TIMESTAMP] (#10053)
This commit is contained in:
@ -113,12 +113,33 @@ distribution_info
|
||||
BITMAP_UNION: The aggregation mode of BIMTAP type columns, which performs the union aggregation of bitmaps.
|
||||
```
|
||||
|
||||
* `default_value`
|
||||
|
||||
Default value of the column. If the load data does not specify a value for this column, the system will assign a default value to this column.
|
||||
|
||||
The syntax is: `default default_value`。
|
||||
|
||||
Currently, the default value supports two forms:
|
||||
|
||||
1. The user specifies a fixed value, such as:
|
||||
|
||||
```SQL
|
||||
k1 INT DEFAULT '1',
|
||||
k2 CHAR(10) DEFAULT 'aaaa'
|
||||
```
|
||||
2. Keywords are provided by the system. Currently, the following keywords are supported:
|
||||
|
||||
```SQL
|
||||
// This keyword is used only for DATETIME type. If the value is missing, the system assigns the current timestamp.
|
||||
dt DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
k1 TINYINT,
|
||||
k2 DECIMAL(10,2) DEFAULT "10.5",
|
||||
k4 BIGINT NULL DEFAULT VALUE "1000" COMMENT "This is column k4",
|
||||
k4 BIGINT NULL DEFAULT "1000" COMMENT "This is column k4",
|
||||
v1 VARCHAR(10) REPLACE NOT NULL,
|
||||
v2 BITMAP BITMAP_UNION,
|
||||
v3 HLL HLL_UNION,
|
||||
|
||||
@ -113,13 +113,34 @@ distribution_info
|
||||
BITMAP_UNION:BIMTAP 类型的列的聚合方式,进行位图的并集聚合。
|
||||
```
|
||||
|
||||
* `default_value`
|
||||
|
||||
列默认值,当导入数据未指定该列的值时,系统将赋予该列default_value。
|
||||
|
||||
语法为`default default_value`。
|
||||
|
||||
当前default_value支持两种形式:
|
||||
|
||||
1. 用户指定固定值,如:
|
||||
|
||||
```SQL
|
||||
k1 INT DEFAULT '1',
|
||||
k2 CHAR(10) DEFAULT 'aaaa'
|
||||
```
|
||||
2. 系统提供的关键字,目前支持以下关键字:
|
||||
|
||||
```SQL
|
||||
// 只用于DATETIME类型,导入数据缺失该值时系统将赋予当前时间
|
||||
dt DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
```
|
||||
|
||||
|
||||
示例:
|
||||
|
||||
```text
|
||||
k1 TINYINT,
|
||||
k2 DECIMAL(10,2) DEFAULT "10.5",
|
||||
k4 BIGINT NULL DEFAULT VALUE "1000" COMMENT "This is column k4",
|
||||
k4 BIGINT NULL DEFAULT "1000" COMMENT "This is column k4",
|
||||
v1 VARCHAR(10) REPLACE NOT NULL,
|
||||
v2 BITMAP BITMAP_UNION,
|
||||
v3 HLL HLL_UNION,
|
||||
|
||||
Reference in New Issue
Block a user