ClickHouse/docs/en/data_types/fixedstring.rst

11 lines
801 B
ReStructuredText
Raw Normal View History

2017-04-03 19:49:50 +00:00
FixedString(N)
--------------
2017-04-26 18:10:25 +00:00
A fixed-length string of N bytes (not characters or code points). N must be a strictly positive natural number.
When server reads a string (as an input passed in INSERT query, for example) that contains fewer bytes, the string is padded to N bytes by appending null bytes at the right.
When server reads a string that contains more bytes, an error message is returned.
When server writes a string (as an output of SELECT query, for example), null bytes are not trimmed off of the end of the string, but are output.
Note that this behavior differs from MySQL behavior for the CHAR type (where strings are padded with spaces, and the spaces are removed for output).
2017-04-03 19:49:50 +00:00
2017-04-26 18:10:25 +00:00
Fewer functions can work with the FixedString(N) type than with String, so it is less convenient to use.