# Choose an insert method

Choose the input path according to where the rows already exist and which representation preserves their types and missing values.

## Input paths

| Source                         | Method                                                                      |
| ------------------------------ | --------------------------------------------------------------------------- |
| Explicit values in SQL         | `INSERT ... VALUES`.                                                        |
| A query of existing data       | `INSERT ... SELECT`.                                                        |
| A native client's input stream | Attached `INSERT ... FORMAT` data on stdin.                                 |
| Files on the client machine    | Native client `FROM INFILE`, including supported compressed file patterns.  |
| An HTTP upload                 | INSERT SQL in the `query` URL parameter, input bytes in the body.           |
| Files available to the server  | `file()` under `user_files_path`, with an explicit schema for most formats. |

## Format choice

Choose a format that supports input and can preserve the value types you need. Plain CSV uses field order; names-header variants can name fields. JSON row objects use `json_each_row` in CoordinatorDB.

All paths validate destination declarations and constraints. No asynchronous INSERT queue is provided: success follows statement completion. Use a transaction to group several related statements.

See [`INSERT INTO`](https://coordinatordb.com/docs/reference/statements/insert-into), [batch inserts](https://coordinatordb.com/docs/concepts/features/operations/insert/bulkinserts) and the [format guide](https://coordinatordb.com/docs/guides/clickhouse/data-formats/intro).
