TRAILING is part of the ANSI-SQL TRIM specification. When used inside TRIM, it tells the database engine to strip the specified character (or the default space) only from the rightmost end of the input string. Unlike LEADING (left side) or BOTH (both sides), TRAILING focuses exclusively on the string’s tail. The keyword is not a standalone statement; it must appear inside the TRIM function. If no trim character is supplied, spaces are assumed. Many databases also accept the shorter form TRIM(TRAILING FROM string) or the two-argument form TRIM(TRAILING trim_char FROM string).
trim_character
(string) - Optional. Single character (or string in some dialects) to remove. Default is space.string
(string) - Required. The source string from which to remove trailing characters.SQL:1999
TRAILING directs the TRIM function to remove characters only from the right side of a string.
No. TRAILING must appear inside TRIM; it is not a standalone function or clause.
The database removes spaces by default.
Performance is generally identical because all are parsed into the same underlying trimming operation by the engine.