Mariadb Reverse Function

MariaDB: REVERSE Function

This MariaDB tutorial explains how to use the MariaDB REVERSE function with syntax and examples.

Description

The MariaDB REVERSE function returns a string with the characters in reverse order.

Syntax

The syntax for the REVERSE function in MariaDB is:

REVERSE( string )

Parameters or Arguments

string

The source string whose characters are to be reversed.

Note

  • The REVERSE function is safe to use with multi-bytes.

Applies To

The REVERSE function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB REVERSE function examples and explore how to use the REVERSE function in MariaDB.

For example:

SELECT REVERSE('AODBA.com');
Output: 'moc.ABDOA'

SELECT REVERSE('ABCD');
Output: 'DCBA'

SELECT REVERSE('1234');
Output: '4321'

SELECT REVERSE(1234);
Output: '4321'