REVERSE Function

Reverses a character expression.

Category: Character
Returned data type: NCHAR

Syntax

REVERSE(expression)

Arguments

expression

specifies any valid expression that evaluates to a character string.

Data type NCHAR
See <sql-expression>
FedSQL Expressions

Details

The REVERSE function returns a character value with the last character in the expression is the first character in the result, the next-to-last character in the expression is the second character in the result, and so on.
Note: Trailing blanks in the expression become leading blanks in the result.

Example

The following statement illustrates the REVERSE function:
Statements
Results
----+----1
select reverse('xyz  ');
  zyx
Last updated: February 23, 2017