mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 01:44:31 +02:00
sqlite-utils csv data.db "select ..." command
This commit is contained in:
parent
6f54342570
commit
c83dd8a5eb
3 changed files with 55 additions and 0 deletions
11
docs/cli.rst
11
docs/cli.rst
|
|
@ -6,6 +6,17 @@
|
|||
|
||||
The ``sqlite-utils`` command-line tool can be used to manipulate SQLite databases in a number of different ways.
|
||||
|
||||
Running queries and returning CSV
|
||||
=================================
|
||||
|
||||
You can execute a SQL query against a database and get the results back as CSV like this::
|
||||
|
||||
$ sqlite-utils csv docs.db "select id, title, author from documents"
|
||||
|
||||
This will default to including the column names as a header row. To exclude the headers, use ``--no-headers``:
|
||||
|
||||
$ sqlite-utils csv docs.db "select id, title, author from documents" --no-headers
|
||||
|
||||
Listing tables
|
||||
==============
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue