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

> 计算存储于 Dynamic 列中的不同数据类型列表。

# distinctDynamicTypes

<div id="distinctDynamicTypes">
  ## distinctDynamicTypes
</div>

引入版本：v24.9.0

计算存储在 [Dynamic](/zh/reference/data-types/dynamic) 列中的去重数据类型列表。

**语法**

```sql theme={null}
distinctDynamicTypes(dynamic)
```

**参数**

* `dynamic` — Dynamic 列。[`Dynamic`](/zh/reference/data-types/dynamic)

**返回值**

返回已排序的数据类型名称列表。[`Array(String)`](/zh/reference/data-types/array)

**示例**

**混合类型的基本用法**

```sql title=Query theme={null}
DROP TABLE IF EXISTS test_dynamic;
CREATE TABLE test_dynamic(d Dynamic) ENGINE = Memory;
INSERT INTO test_dynamic VALUES (42), (NULL), ('Hello'), ([1, 2, 3]), ('2020-01-01'), (map(1, 2)), (43), ([4, 5]), (NULL), ('World'), (map(3, 4));

SELECT distinctDynamicTypes(d) FROM test_dynamic;
```

```response title=Response theme={null}
┌─distinctDynamicTypes(d)──────────────────────────────────────────┐
│ ['Array(Int64)', 'Date', 'Int64', 'Map(UInt8, UInt8)', 'String'] │
└──────────────────────────────────────────────────────────────────┘
```
