This is an old revision of the document!
The TRIM function removes any leading and/or trailing pad characters from a string. The pad character is a single character and defaults to a space character.
TRIM([<LEADING | TRAILING | BOTH>]['character'][FROM] column | 'string')
Optional. Specifies if the leading, trailing or both leading and trailing pad characters will be removed from a string. If omitted, the FROM keyword must also be omitted. BOTH is the default.
Optional. Specify the pad character that is to be removed. If omitted, white space will be removed.
DO NOT USE if LEADING, TRAILING, or BOTH keyword was NOT specified.
Required. The string that will be “trimmed”.
select company, trim(contact) from customers where company='systems'
select company, trim(LEADING FROM contact) from customers where company='systems'
select company, trim(TRAILING ',' FROM contact) from customers where company='systems'