csvdb(1) csvdb(1)
NAME
csvdb - sql engine for csv files
SYNOPSIS
csvdb [-f <file>] [-a <file>] [-n <alias>] [-e <query>]
DESCRIPTION
This manual page documents briefly the csvdb command.
csvdb is an SQL engine for csv (comma separated values) files, allowing
files to be searched as if they were database tables.
-f <file>
Load <file> as a table. Multiple -f arguments can be used to
include multiple files
-a <file>
Load Apache log file <file> as a table. Multiple -a arguments
can be used to include multiple files
-n <alias>
Set <alias> as a name alias for the previous file loaded with -f
or -a
-e <query>
Execute <query>
EXAMPLES
csvdb -f test.csv -e "DESCRIBE FILE"
Load test.csv and describe (list) it's columns
csvdb -f test.csv -n test
Load test.csv with alias test, and start the csvdb shell
csvdb -f test.csv -f /home/user/example.csv
Load test.csv and /home/user/example.csv, and start the csvdb
shell
csvdb
Start the csvdb shell
SUPPORTED QUERIES
SELECT [ALL | DISTINCT]
select_expr [, select_expr ...]
FROM {table_reference | file_reference}
[WHERE where_condition]
[GROUP BY {col_name | expr} [, ... ]
[HAVING where_condition]]
[ORDER BY {col_name | expr}
[AS {INT | STRING}] [ASC | DESC], ...]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
[INTO OUTFILE 'file_name']
DROP [TEMPORARY | PERMANENT] TABLE [IF EXISTS]
tbl_name
SHOW COLUMNS FROM tbl_name
{DESCRIBE | DESC} tbl_name
LOAD DATA INFILE [WITHOUT NAMES | APACHE] 'file_name'
[AS alias]
[INTO TABLE 'outfile_name']
SHOW TABLES
[LIKE 'pattern']
SHOW SETTINGS
SET setting state
UPDATE [IGNORE] table_reference
SET col_name1=expr1 [, col_name2=expr2] ...
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]
INSERT [IGNORE]
[INTO] tbl_name (col_name,...)
{VALUES | VALUE} ({value},...),(...),...
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
DELETE [IGNORE] FROM tbl_name
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]
ALTER [IGNORE] TABLE tbl_name
[alter_specification [, alter_specification] ...]
AUTHOR
Written by Lisa Milne.
COPYRIGHT
Copyright 2011 Lisa Milne <lisa@ltmnet.com>. License GPLv3+: GNU GPL
version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
October 2011 csvdb(1)
csvdb 0.6 - Generated Tue Feb 19 13:36:50 CST 2019
