Updating a database file via cli


Note that the sqlite_stat3 and sqlite_stat4 tables contain samples of index entries and so might contain sensitive data, so do not send the ".fullschema" output of a proprietary database over a public channel.

Use the ".import" command to import CSV (comma separated value) data into an SQLite table.

The sqlite3 program provides several convenience commands that are useful for looking at the schema of the database.

In the example above, that line causes the CSV content to be written into a file named "C:/work/dataout.csv".

The final line of the example (the ".system c:/work/dataout.csv") has the same effect as double-clicking on the c:/work/file in windows.

For the second case, when the table already exists, every row of the CSV file, including the first row, is assumed to be actual content.

If the CSV file contains an initial row of column labels, that row will be read as data and inserted into the table.

The ".fullschema" command normally provides all of the information needed to exactly recreate a query plan for a specific query.

You must have an account to comment. Please register or login here!