---
title: "REVERSE"
description: "The REVERSE SQL function flips the input around."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/reverse
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/reverse
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> REVERSE[REVERSE]:::quoted
    REVERSE --> End((END))
```

## Purpose
The `REVERSE` SQL function flips the input around.

Parameters:
- Input (`varchar2`): text to flip around.

Returns: the text with its characters in reversed order.

## Examples
The following example reverses the text `abc`:
```sql
select reverse('abc')

-------------------
cba
```
The following example reverses a reversed text, returning the original input:
```sql
select reverse(reverse('abc'))

-------------------
abc
```