REVERSE
Functions › Text › Change a string
Returns a string with its characters in reverse order.
Syntax
REVERSE( <string> )
Arguments
| Argument | Description |
|---|---|
<string> | The text to reverse. |
Returns
Text. NULL when <string> is NULL.
Usage notes
- It reverses characters, not bytes, so text outside ASCII stays valid.
- On large tables the engine runs it in the data store.
Examples
SELECT p.sku, REVERSE(p.sku) AS reversed FROM Product p
| sku | reversed |
|---|---|
| AB-100 | 001-BA |
See also
RIGHT · SPLIT_PART · STRPOS