From 1c0bddd903fd50b3e69e2ac677474dd58f33df71 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 14 May 2024 17:44:24 +0800 Subject: [PATCH] docs: Update data type alias (#951) Signed-off-by: tison --- docs/nightly/en/reference/sql/data-types.md | 36 ++++++++++----------- docs/nightly/zh/reference/sql/data-types.md | 36 ++++++++++----------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/nightly/en/reference/sql/data-types.md b/docs/nightly/en/reference/sql/data-types.md index 4e7a3ac93..2bf6127f8 100644 --- a/docs/nightly/en/reference/sql/data-types.md +++ b/docs/nightly/en/reference/sql/data-types.md @@ -90,24 +90,24 @@ INSERT INTO bools(b) VALUES (TRUE), (FALSE); For users migrating from MySQL or PostgreSQL to GreptimeDB, GreptimeDB supports the following alias types. -| Data Type | Alias Types | -|----------------------|-------------------------------------------| -| `String` | `Text`, `Varchar`, `Char` | -| `Binary` | `Varbinary` | -| `Int8` | `TinyInt` | -| `Int16` | `SmallInt` | -| `Int32` | `Int` | -| `Int64` | `BigInt` | -| `UInt8` | `UnsignedInt` | -| `UInt16` | `UnsignedTinyInt` | -| `UInt32` | `UnsignedSmallInt` | -| `UInt64` | `UnsignedBigInt` | -| `Float32` | `Float` | -| `Float64` | `Double` | -| `TimestampSecond` | `Timestamp_s`, `Timestamp_sec`, `Timestamp(0)` | -| `TimestampMillisecond`| `Timestamp`, `Timestamp_ms` , `Timestamp(3)`| -| `TimestampMicroSecond`| `Timestamp_us`, `Timestamp(6)` | -| `TimestampNanosecond`| `Timestamp_ns`, `Timestamp(9)` | +| Data Type | Alias Types | +| ---------------------- | --------------------------------------------------------------- | +| `String` | `Text`, `TinyText`, `MediumText`, `LongText`, `Varchar`, `Char` | +| `Binary` | `Varbinary` | +| `Int8` | `TinyInt` | +| `Int16` | `SmallInt` | +| `Int32` | `Int` | +| `Int64` | `BigInt` | +| `UInt8` | `UnsignedInt` | +| `UInt16` | `UnsignedTinyInt` | +| `UInt32` | `UnsignedSmallInt` | +| `UInt64` | `UnsignedBigInt` | +| `Float32` | `Float` | +| `Float64` | `Double` | +| `TimestampSecond` | `Timestamp_s`, `Timestamp_sec`, `Timestamp(0)` | +| `TimestampMillisecond` | `Timestamp`, `Timestamp_ms`, `Timestamp(3)` | +| `TimestampMicroSecond` | `Timestamp_us`, `Timestamp(6)` | +| `TimestampNanosecond` | `Timestamp_ns`, `Timestamp(9)` | You can use these alias types when creating tables. For example, use `Varchar` instead of `String`, `Double` instead of `Float64`, and `Timestamp(0)` instead of `TimestampMillisecond`. diff --git a/docs/nightly/zh/reference/sql/data-types.md b/docs/nightly/zh/reference/sql/data-types.md index b8d2b3982..fd2733c27 100644 --- a/docs/nightly/zh/reference/sql/data-types.md +++ b/docs/nightly/zh/reference/sql/data-types.md @@ -89,24 +89,24 @@ INSERT INTO bools(b) VALUES (TRUE), (FALSE); 对于从 MySQL 或 PostgreSQL 迁移到 GreptimeDB 的用户,GreptimeDB 支持以下类型别名。 -| 数据类型 | 别名 | -|----------------------|----------------------------------------| -| `String` | `Text`, `Varchar`, `Char` | -| `Binary` | `Varbinary` | -| `Int8` | `TinyInt` | -| `Int16` | `SmallInt` | -| `Int32` | `Int` | -| `Int64` | `BigInt` | -| `UInt8` | `UnsignedInt` | -| `UInt16` | `UnsignedTinyInt` | -| `UInt32` | `UnsignedSmallInt` | -| `UInt64` | `UnsignedBigInt` | -| `Float32` | `Float` | -| `Float64` | `Double` | -| `TimestampSecond` | `Timestamp_s`, `Timestamp_sec`, `Timestamp(0)` | -| `TimestampMillisecond`| `Timestamp`, `Timestamp_ms` , `Timestamp(3)`| -| `TimestampMicroSecond`| `Timestamp_us`, `Timestamp(6)` | -| `TimestampNanosecond`| `Timestamp_ns`, `Timestamp(9)` | +| 数据类型 | 别名 | +| ---------------------- | --------------------------------------------------------------- | +| `String` | `Text`, `TinyText`, `MediumText`, `LongText`, `Varchar`, `Char` | +| `Binary` | `Varbinary` | +| `Int8` | `TinyInt` | +| `Int16` | `SmallInt` | +| `Int32` | `Int` | +| `Int64` | `BigInt` | +| `UInt8` | `UnsignedInt` | +| `UInt16` | `UnsignedTinyInt` | +| `UInt32` | `UnsignedSmallInt` | +| `UInt64` | `UnsignedBigInt` | +| `Float32` | `Float` | +| `Float64` | `Double` | +| `TimestampSecond` | `Timestamp_s`, `Timestamp_sec`, `Timestamp(0)` | +| `TimestampMillisecond` | `Timestamp`, `Timestamp_ms` , `Timestamp(3)` | +| `TimestampMicroSecond` | `Timestamp_us`, `Timestamp(6)` | +| `TimestampNanosecond` | `Timestamp_ns`, `Timestamp(9)` | 在创建表时也可以使用这些别名类型。 例如,使用 `Varchar` 代替 `String`,使用 `Double` 代替 `Float64`,使用 `Timestamp(0)` 代替 `TimestampMillisecond`。