TRIM

All functions > STRING > TRIM

Removes whitespace from both ends of a string.

Syntax

TRIM(expr)
sql

Arguments

ParameterTypeRequiredDescription
stringVARCHARYesString to trim

Returns

String with leading and trailing whitespace removed

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

Last update at: 2025/10/13 10:23:46