TRIM

All functions > STRING > TRIM

Returns the string with whitespace from both ends removed.

Signatures

Returns: String with leading and trailing whitespace removed

TRIM(string: VARCHAR) → VARCHAR
sql
ParameterTypeRequiredDescription
stringVARCHARYesString to trim

Notes

  • Removes spaces, tabs, newlines, and other whitespace characters
  • Whitespace in the middle of the string is preserved
  • Does not remove non-whitespace characters

Examples

FeatureQL
SELECT
    f1 := TRIM('  hello  '),  -- Trim both ends
    f2 := TRIM('	world	'),  -- Trim tabs
    f3 := TRIM('  mixed   spaces  '),  -- Only trim ends
    f4 := TRIM('no trim needed')  -- No whitespace to trim
;
Result
f1 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
helloworldmixed spacesno trim needed

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19