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

> Vertical 格式文档

# Vertical

| 输入 | 输出 | 别名 |
| - | - | - |
| ✗ | ✔ | |

<h2 id="description">
  说明
</h2>

每个值都会单独输出一行，并附带指定的列名。如果每一行都包含大量列，这种格式很适合只输出一行或少量几行数据。

请注意，[`NULL`](/zh/reference/syntax) 会输出为 `ᴺᵁᴸᴸ`，以便更容易区分字符串值 `NULL` 和空值。JSON 列会以 Pretty 格式输出，而 `NULL` 会输出为 `null`，因为它是有效的 JSON 值，并且很容易与 `"null"` 区分。

<h2 id="example-usage">
  使用示例
</h2>

示例：

```sql theme={null}
SELECT * FROM t_null FORMAT Vertical
```

```response theme={null}
Row 1:
──────
x: 1
y: ᴺᵁᴸᴸ
```

默认情况下，值和列名中的不可打印控制字符 (C0 控制字符 `0x00`–`0x1F` 以及 `DEL` `0x7F`) 会显示为对应的 Unicode "Control Pictures" (控制符号图形，`U+2400`–`U+2421`) ，使其保持可见，而不会被终端悄无声息地吞掉。例如，NUL 会显示为 `␀`：

```sql theme={null}
SELECT 'string with a NUL \0 character' AS test FORMAT Vertical
```

```response theme={null}
Row 1:
──────
test: string with a NUL ␀ character
```

`TAB`、换行符和 `ESC` 是例外：它们始终按原样输出，因为终端会解释这些字符，而不是将其吞掉——制表符会跳到下一个制表位，换行符会换行，而数据之所以能够呈现可视化效果，靠的正是 ANSI 转义序列。列名则是这一例外中的例外：列名会渲染在单行中，因此名称中的换行符会像其他控制字符一样被替换。

如需按原样输出控制字符，请禁用 [`output_format_pretty_display_control_characters`](/zh/reference/settings/formats#output_format_pretty_display_control_characters)：

```sql theme={null}
SELECT 'string with a NUL \0 character' AS test
FORMAT Vertical
SETTINGS output_format_pretty_display_control_characters = 0
```

此时响应中包含的是原始的 `NUL` 字节。终端会将其吞掉，因此该值
看起来就像是缺少了这个字符一样。

此格式仅适用于输出查询结果，不适用于解析 (即获取要插入表中的数据) 。

<h2 id="format-settings">
  格式设置
</h2>
