SQLite Forum

Inserting multiple rows in table
Login
One other note on using the CLI and .read is that you can use the .bail option of the CLI to make it an all-or-nothing import if that's important.

So my file would look like:
.bail on
begin;
<inserts, updates, etc>
commit;

With ".bail on" set and the transaction in there, then .read will stop at the first error and it won't commit it all.

Depending on how complex your statements are and what was in your database to begin with, cleaning up an attempt which stopped with an error so that you can try again might be complicated, annoying, or impossible.