Trailing white space characters
Combinations of characters with white space can occur in quoted strings, in CHAR columns that contain fewer characters than the declared column length, and in other contexts.
For example, if a CHAR(5) column in a single-byte code
set contains three characters, the string is padded with two white
spaces so that its length is equal to the column length:
abcss
The
next example represents a string of five characters (three characters
of data and two trailing white space characters) in a multibyte code
set where each of the data characters and white space characters consists
of 2 bytes:
A1A2B1B2C1C2s1s2s1s2
In
some locales, a string can contain both single-byte and multibyte
white space characters. For example, consider the following string:
abcss1s2sss1s2
The
string has three single-byte characters (abc
), a
single-byte white space character (s
), a multibyte
white space character (s1s2
),
two single-byte white space characters (ss
), and
one multibyte white space character (s1s2
).