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

> Allows to perform queries on data stored in a SQLite database.

# sqlite

Allows to perform queries on data stored in a [SQLite](/reference/engines/database-engines/sqlite) database.

<h2 id="syntax">
  Syntax
</h2>

```sql theme={null}
sqlite('db_path', 'table_name')
```

<h2 id="arguments">
  Arguments
</h2>

* `db_path` — Path to a file with an SQLite database. [String](/reference/data-types/string).
* `table_name` — Name of a table in the SQLite database. [String](/reference/data-types/string).

<h2 id="returned_value">
  Returned value
</h2>

* A table object with the same columns as in the original `SQLite` table.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2;
```

```text title="Response" theme={null}
┌─col1──┬─col2─┐
│ line1 │    1 │
│ line2 │    2 │
│ line3 │    3 │
└───────┴──────┘
```

<h2 id="related">
  Related
</h2>

* [SQLite](/reference/engines/table-engines/integrations/sqlite) table engine
* [SQLite database engine](/reference/engines/database-engines/sqlite) — Data types support section
