TRIM function [String]

Function

Removes leading and trailing blanks from a string.

Syntax

TRIM ( string-expression )

Parameters

string-expression The string to be trimmed.

Example

The following statement returns the value chocolate with no leading or trailing blanks.

SELECT TRIM( '   chocolate   ' ) FROM iq_dummy

Standards and compatibility

See also

“LTRIM function [String]”

“RTRIM function [String]”