RTRIM

All functions > STRING > RTRIM

Removes whitespace from the right (end) of a string.

Syntax

RTRIM(expr)
sql

Arguments

ParameterTypeRequiredDescription
stringVARCHARYesString to trim

Returns

String with trailing whitespace removed

Notes

  • Removes spaces, tabs, newlines from the end only
  • Leading whitespace is preserved
  • Middle whitespace is preserved

Examples

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