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

> Documentation for Files

# Files

<h2 id="file">
  file
</h2>

Reads a file as string and loads the data into the specified column. The file content is not interpreted.

Also see table function [file](/reference/functions/table-functions/file).

**Syntax**

```sql theme={null}
file(path[, default])
```

**Arguments**

* `path` — The path of the file relative to [user\_files\_path](/reference/settings/server-settings/settings#user_files_path). Supports wildcards `*`, `**`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` are numbers and `'abc', 'def'` are strings.
* `default` — The value returned if the file does not exist or cannot be accessed. Supported data types: [String](/reference/data-types/string) and [NULL](/reference/settings/formats#input_format_null_as_default).

**Example**

Inserting data from files a.txt and b.txt into a table as strings:

```sql theme={null}
INSERT INTO table SELECT file('a.txt'), file('b.txt');
```
