> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-86180b7b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Exibe os dados do dicionário como uma tabela no ClickHouse. Funciona da mesma forma que o motor Dicionário.

# dictionary

Exibe os dados do [dicionário](/pt-BR/reference/statements/create/dictionary) como uma tabela no ClickHouse. Funciona da mesma forma que o motor [Dicionário](/pt-BR/reference/engines/table-engines/special/dictionary).

<div id="syntax">
  ## Sintaxe
</div>

```sql theme={null}
dictionary('dict')
```

<div id="arguments">
  ## Argumentos
</div>

* `dict` — Nome de um dicionário. [String](/pt-BR/reference/data-types/string).

<div id="returned_value">
  ## Valor retornado
</div>

Uma tabela do ClickHouse.

<div id="examples">
  ## Exemplos
</div>

Tabela de entrada `dictionary_source_table`:

```text theme={null}
┌─id─┬─value─┐
│  0 │     0 │
│  1 │     1 │
└────┴───────┘
```

Crie um dicionário:

```sql title="Query" theme={null}
CREATE DICTIONARY new_dictionary(id UInt64, value UInt64 DEFAULT 0) PRIMARY KEY id
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dictionary_source_table')) LAYOUT(DIRECT());
```

```sql title="Query" theme={null}
SELECT * FROM dictionary('new_dictionary');
```

```text title="Response" theme={null}
┌─id─┬─value─┐
│  0 │     0 │
│  1 │     1 │
└────┴───────┘
```

<div id="related">
  ## Relacionado
</div>

* [Motor Dicionário](/pt-BR/reference/engines/table-engines/special/dictionary)
