Skip to content

Commit d7fcab7

Browse files
committed
README update
1 parent bdf006d commit d7fcab7

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,25 @@
22
Command-line tool to load csv files and run sql commands
33

44
[![Go](https://github.com/dhamith93/csv-sql/actions/workflows/go.yml/badge.svg)](https://github.com/dhamith93/csv-sql/actions/workflows/go.yml)
5+
6+
## Usage
7+
8+
csv-sql supports loading and saving results as CSV files with data processing with SQLite compatible sql commands
9+
10+
### Loading a file
11+
```
12+
LOAD /path/to/file.csv table_name
13+
```
14+
15+
### Creating a new table with a select query
16+
```sql
17+
CREATE TABLE emp_user AS SELECT emp.emp_id, emp.name, user.user_name, user.role FROM emp INNER JOIN user ON emp.user_id = user.id
18+
```
19+
20+
### Saving a table as a csv
21+
```
22+
SAVE table_name /path/to/save.csv
23+
```
24+
## Screenshots
25+
26+
![](screenshots/screenshot_01.png)

screenshots/screenshot_01.png

271 KB
Loading

0 commit comments

Comments
 (0)