---
title: "TO_HEX"
description: "Funkce SQL TO_HEX p\u0159ev\u00E1d\u00ED BLOB na text v hexadecim\u00E1ln\u00EDm z\u00E1pisu."
language: cs
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/cs/docs/invantive-universalsql/grammar/sql-functions/to-hex
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/to-hex
updated: 2026-12-04T14:38:02Z
license: https://documentation.invantive.eu/cs/
---

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

## Účel
Funkce SQL `TO_HEX` převádí `blob` na text v hexadecimálním zápisu.

Viz také [[ASCII_TO_BLOB]], [[BLOB_TO_TEXT]] a [[HEX_TO_BLOB]].

Parametry:
- Vstup (`blob`): hodnota, která se má převést na hexadecimální zápis.

Vrací: `blob` převedený na text v hexadecimálním zápisu jako `varchar2`.

## Příklady
Následující příklad načte hexadecimální zápis GUID:
```sql
select to_hex(newid())

--------------------------------------
cde6acae957b492ea304bfd8692f1ace
```
Následující příklad načte hexadecimální zápis GZIP-komprimované varianty jednobajtového ASCII znaku `x`:
```sql
select to_hex(gzip('eA=='))

--------------------------------------
1F8B0800E4BF266A00FFAB00008316DC8C01000000
```

