SQL TRIM function is used for removing spaces and characters from both ends of the string. The TRIM() function removes the space character OR other specified characters from the start or end of a string. By default, the TRIM() function removes leading and trailing spaces from a string.

SQL TRIM Function Example

The syntax of the TRIM() Function is the following.

TRIM ([removed_characters FROM] input_string)

See the parameters of the TRIM() function.

  1. removed_characters: It is a literal, variable of any non-LOB character type contains characters which will be removed.
  2. input_string: It is an expression that depicts the kind of characters to be removed.

#sql #sql trim

SQL TRIM Function Example | trim() Function In SQL
1.80 GEEK