ClickHouse/docs/zh/data_types/fixedstring.md
谢磊 9aa6c7053f finish dataTypes zh translate (#3417)
* add dataTypes zh translate --> init docs

* add dataTypes zh translate

* finish dataTypes zh translate

* fix punctuation in dataTypes zh translate
2018-10-19 11:02:26 +03:00

10 lines
726 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FixedString(N)
固定长度 N 的字符串。N 必须是严格的正自然数。
当服务端读取长度小于 N 的字符串时候(例如解析 INSERT 数据时),通过在字符串末尾添加空字节来达到 N 字节长度。
当服务端读取长度大于 N 的字符串时候,将返回错误消息。
当服务器写入一个字符串(例如,当输出 SELECT 查询的结果NULL字节不会从字符串的末尾被移除而是被输出。
注意这种方式与 MYSQL 的 CHAR 类型是不一样的MYSQL 的字符串会以空格填充,然后输出的时候空格会被修剪)。
`String` 类型相比,极少的函数会使用 `FixedString(N)`,因此使用起来不太方便。