CREATE TABLE data_types (
  s string,
  i2 int2,
  i4 int4,
  i8 int8,
  f4 float4,
  f8 float8,
  u64 uint64,
  u32 uint32,
  u16 uint16,
  u8 uint8,
  sint int16,
  i INT32,
  bint INT64,
  v varchar,
  f FLOAT32,
  d FLOAT64,
  b boolean,
  vb varbinary,
  dt date,
  dtt datetime,
  ts0 TimestampSecond,
  ts3 Timestamp_MS,
  ts6 Timestamp_US,
  ts9 TimestampNanosecond DEFAULT CURRENT_TIMESTAMP() TIME INDEX,
  PRIMARY KEY(s));

Affected Rows: 0

SHOW CREATE TABLE data_types;

+------------+------------------------------------------------------------+
| Table      | Create Table                                               |
+------------+------------------------------------------------------------+
| data_types | CREATE TABLE IF NOT EXISTS "data_types" (                  |
|            |   "s" STRING NULL,                                         |
|            |   "i2" SMALLINT NULL,                                      |
|            |   "i4" INT NULL,                                           |
|            |   "i8" BIGINT NULL,                                        |
|            |   "f4" FLOAT NULL,                                         |
|            |   "f8" DOUBLE NULL,                                        |
|            |   "u64" BIGINT UNSIGNED NULL,                              |
|            |   "u32" INT UNSIGNED NULL,                                 |
|            |   "u16" SMALLINT UNSIGNED NULL,                            |
|            |   "u8" TINYINT UNSIGNED NULL,                              |
|            |   "sint" SMALLINT NULL,                                    |
|            |   "i" INT NULL,                                            |
|            |   "bint" BIGINT NULL,                                      |
|            |   "v" STRING NULL,                                         |
|            |   "f" FLOAT NULL,                                          |
|            |   "d" DOUBLE NULL,                                         |
|            |   "b" BOOLEAN NULL,                                        |
|            |   "vb" VARBINARY NULL,                                     |
|            |   "dt" DATE NULL,                                          |
|            |   "dtt" TIMESTAMP(6) NULL,                                 |
|            |   "ts0" TIMESTAMP(0) NULL,                                 |
|            |   "ts3" TIMESTAMP(3) NULL,                                 |
|            |   "ts6" TIMESTAMP(6) NULL,                                 |
|            |   "ts9" TIMESTAMP(9) NOT NULL DEFAULT current_timestamp(), |
|            |   TIME INDEX ("ts9"),                                      |
|            |   PRIMARY KEY ("s")                                        |
|            | )                                                          |
|            |                                                            |
|            | ENGINE=mito                                                |
|            |                                                            |
+------------+------------------------------------------------------------+

DESC TABLE data_types;

+--------+----------------------+-----+------+---------------------+---------------+
| Column | Type                 | Key | Null | Default             | Semantic Type |
+--------+----------------------+-----+------+---------------------+---------------+
| s      | String               | PRI | YES  |                     | TAG           |
| i2     | Int16                |     | YES  |                     | FIELD         |
| i4     | Int32                |     | YES  |                     | FIELD         |
| i8     | Int64                |     | YES  |                     | FIELD         |
| f4     | Float32              |     | YES  |                     | FIELD         |
| f8     | Float64              |     | YES  |                     | FIELD         |
| u64    | UInt64               |     | YES  |                     | FIELD         |
| u32    | UInt32               |     | YES  |                     | FIELD         |
| u16    | UInt16               |     | YES  |                     | FIELD         |
| u8     | UInt8                |     | YES  |                     | FIELD         |
| sint   | Int16                |     | YES  |                     | FIELD         |
| i      | Int32                |     | YES  |                     | FIELD         |
| bint   | Int64                |     | YES  |                     | FIELD         |
| v      | String               |     | YES  |                     | FIELD         |
| f      | Float32              |     | YES  |                     | FIELD         |
| d      | Float64              |     | YES  |                     | FIELD         |
| b      | Boolean              |     | YES  |                     | FIELD         |
| vb     | Binary               |     | YES  |                     | FIELD         |
| dt     | Date                 |     | YES  |                     | FIELD         |
| dtt    | TimestampMicrosecond |     | YES  |                     | FIELD         |
| ts0    | TimestampSecond      |     | YES  |                     | FIELD         |
| ts3    | TimestampMillisecond |     | YES  |                     | FIELD         |
| ts6    | TimestampMicrosecond |     | YES  |                     | FIELD         |
| ts9    | TimestampNanosecond  | PRI | NO   | current_timestamp() | TIMESTAMP     |
+--------+----------------------+-----+------+---------------------+---------------+

DROP TABLE data_types;

Affected Rows: 0

