← 返回命令列表

Linux command

sqly 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open an interactive SQL shell with a CSV file

sqly [user.csv]

Run a query directly

sqly --sql "[SELECT * FROM user WHERE age > 30]" [user.csv]

Output results as CSV

sqly --sql "[SELECT * FROM user LIMIT 2]" --csv [user.csv]

说明

sqly imports CSV, TSV, LTSV, JSON, and Excel files into an in-memory SQLite3 database, letting you run SQL queries against them. It supports both an interactive shell mode with SQL completion and command history, and direct one-shot query execution. Output can be formatted as ASCII table, CSV, TSV, or LTSV.

FAQ

What is the sqly command used for?

sqly imports CSV, TSV, LTSV, JSON, and Excel files into an in-memory SQLite3 database, letting you run SQL queries against them. It supports both an interactive shell mode with SQL completion and command history, and direct one-shot query execution. Output can be formatted as ASCII table, CSV, TSV, or LTSV.

How do I run a basic sqly example?

Run `sqly [user.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more sqly examples?

This page includes 3 examples for sqly, plus related commands for nearby Linux tasks.