> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for REVERSE function

# REVERSE

Returns the input string with all characters in reverse order.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
REVERSE(<expression>)
```

## Parameters

| Parameter      | Description                | Supported Input Types |
| :------------- | :------------------------- | :-------------------- |
| `<expression>` | The string to be reversed. | `TEXT`                |

## Return Type

`TEXT`

## Examples

Reverse a simple text string:

<div className="query-window">
  ```
  SELECT REVERSE('esimpson');
  ```

  | reverse <span>text</span> |
  | :------------------------ |
  | nospmise                  |

  <p><span>Rows: 1</span><span>Execution time: 5.57ms</span></p>
</div>

Reverse a string containing emoji characters:

<div className="query-window">
  ```
  SELECT REVERSE('👋🌍');
  ```

  | reverse <span>text</span> |
  | :------------------------ |
  | 🌍👋                      |

  <p><span>Rows: 1</span><span>Execution time: 6.71ms</span></p>
</div>
