SQLite Forum

Simple import csv file question
Login
Hi,

What's the *proper* way to import a csv file into a table with SQLite?

<https://sqlite.org/cli.html> says:

*Note that it is important to set the "mode" to "csv" before running the ".import" command.*

Assume the table already exists...

Something like this?

```
sqlite> .mode csv
sqlite> .import mycsvfile.csv mytable
```

Does this also do the same thing?

`.import --csv mycsvfile.cs mytable`

Thanks!