---
title: Query a File
sidebarTitle: 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')
```
