RTRIM()

Description

This function RTRIM() returns the string with trailing space characters removed.

Syntax

  1. > RTRIM(str)

Arguments

ArgumentsDescription
strRequired. CHAR and VARCHAR both are supported.

Examples

  1. > drop table if exists t1;
  2. > create table t1(a char(8),b varchar(10));
  3. > insert into t1 values('matrix ','matrixone ');
  4. > select rtrim(a),rtrim(b) from t1;
  5. +----------+-----------+
  6. | rtrim(a) | rtrim(b) |
  7. +----------+-----------+
  8. | matrix | matrixone |
  9. +----------+-----------+