> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SQLInsert

> SQLInsert フォーマットのドキュメント

| 入力 | 出力 | エイリアス |
| - | - | - |
| ✗ | ✔ | |

## 説明

データを、`INSERT INTO table (columns...) VALUES (...), (...) ...;`ステートメントの連続として出力します。

## 使用例

例:

```sql theme={null}
SELECT number AS x, number + 1 AS y, 'Hello' AS z FROM numbers(10) FORMAT SQLInsert SETTINGS output_format_sql_insert_max_batch_size = 2
```

```sql theme={null}
INSERT INTO table (x, y, z) VALUES (0, 1, 'Hello'), (1, 2, 'Hello');
INSERT INTO table (x, y, z) VALUES (2, 3, 'Hello'), (3, 4, 'Hello');
INSERT INTO table (x, y, z) VALUES (4, 5, 'Hello'), (5, 6, 'Hello');
INSERT INTO table (x, y, z) VALUES (6, 7, 'Hello'), (7, 8, 'Hello');
INSERT INTO table (x, y, z) VALUES (8, 9, 'Hello'), (9, 10, 'Hello');
```

このフォーマットで出力されたデータを読み込むには、[MySQLDump](https://clickhouse.com/docs/ja/reference/formats/MySQLDump.md) 入力フォーマットを使用できます。

## フォーマット設定

| Setting | Description | Default |
| - | - | - |
| [`output_format_sql_insert_max_batch_size`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_sql_insert_max_batch_size) | 1 つの INSERT ステートメントに含められる最大行数。 | `65505` |
| [`output_format_sql_insert_table_name`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_sql_insert_table_name) | 出力される INSERT クエリ内のテーブル名。 | `'table'` |
| [`output_format_sql_insert_include_column_names`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_sql_insert_include_column_names) | INSERT クエリにカラム名を含めます。 | `true` |
| [`output_format_sql_insert_use_replace`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_sql_insert_use_replace) | INSERT の代わりに REPLACE ステートメントを使用します。 | `false` |
| [`output_format_sql_insert_quote_names`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_sql_insert_quote_names) | カラム名を "\`" 文字で囲みます。 | `true` |
