ClickHouse/docs/en/sql-reference/table-functions/sqlite.md
Anna 1d2a6234bc
Update docs/en/sql-reference/table-functions/sqlite.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-19 07:29:38 +03:00

913 B

toc_priority toc_title
55 sqlite

sqlite

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

Syntax

    sqlite('db_path', 'table_name')

Arguments

  • db_path — Path to SQLite file with the database. String.
  • table_name — The SQLite table name. String.

Returned value

  • A table object with the same columns as the original SQLite table.

Example

Query:

SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2;

Result:

┌─col1──┬─col2─┐
│ line1 │    1 │
│ line2 │    2 │
│ line3 │    3 │
└───────┴──────┘

See Also