ClickHouse与MySQL数据类型对应

MySQL ClickHouse
UNSIGNED TINYINT UInt8
TINYINT Int8
UNSIGNED SMALLINT UInt16
SMALLINT Int16
UNSIGNED INT, UNSIGNED MEDIUMINT UInt32
INT, MEDIUMINT Int32
UNSIGNED BIGINT UInt64
BIGINT Int64
FLOAT Float32
DOUBLE Float64
DATE Date
DATETIME, TIMESTAMP DateTime
BINARY FixedString

其他的MySQL数据类型将全部都转换为String

同时以上的所有类型都支持Nullable

 

整型范围

  • Int8-[-128:127]
  • Int16-[-32768:32767]
  • Int32-[-2147483648:2147483647]
  • Int64-[-9223372036854775808:9223372036854775807]

无符号整型范围

  • UInt8-[0:255]
  • UInt16-[0:65535]
  • UInt32-[0:4294967295]
  • UInt64-[0:18446744073709551615]
posted @ 2021-08-26 17:18  梦玄庭  阅读(1877)  评论(0编辑  收藏  举报