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

# Query a File

## Description

In MindsDB, files are treated as tables. These are stored in the default `files` database. To query a file, you must save this `files` database into a variable and then, run the `query()` function on it.

## Syntax

Here is the syntax:

```
server.get_database('files').query('SELECT * FROM file_name')
```
