MySQL REVERSE() Function

Example

Reverse a string:

SELECT REVERSE("SQL Tutorial");
Try it Yourself »

Definition and Usage

The REVERSE() function reverses a string and returns the result.

Syntax

REVERSE(string)

Parameter Values

Parameter Description
string Required. The string to reverse

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Reverse the text in CustomerName:

SELECT REVERSE(CustomerName)
FROM Customers;
Try it Yourself »

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.