---
title: "TRANSLATE"
description: "The TRANSLATE SQL function replaces all occurrences of each character in from_string to its corresponding character in to_string."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/translate
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/translate
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)) --> TRANSLATE[TRANSLATE]:::quoted
    TRANSLATE --> End((END))
```

## Purpose
The `TRANSLATE` SQL function replaces all occurrences of each character in `from_string` to its corresponding character in `to_string`.

See also [[REPLACE]].

Parameters:
- `input` (`varchar2`): The text to replace a sequence of characters with another set of characters.
- `from_string` (`varchar2`): The text that will be searched for in the input.
- `to_string` (`varchar2`): All characters in the `from_string` will be replaced with the corresponding character in the `to_string`.

Returns: the input with all occurrences of each character in `from_string` replaced by its corresponding character in `to_string`.

## Examples
The following example replaces the characters `*`, ` `, `/` and `-` each by `_`, and removes the character `'` since it has no corresponding character in `to_string`:
```sql
select translate('some*text to/be testing-wit''h', '* /-''', '____')

----------------------------
some_text_to_be_testing_with
```
The following example returns the input unchanged since none of the characters in `from_string` occur in the input:
```sql
select translate('some*text to/be testing-wit''h', '_____', '_____')

-----------------------------
some*text to/be testing-wit'h
```