Looks like it’s as simple as
#!/bin/bash
sqlite3 test.db "create table n (id INTEGER PRIMARY KEY,f TEXT,l TEXT);"
sqlite3 test.db "insert into n (f,l) values ('john','smith');"
sqlite3 test.db "select * from n;"
from https://mailliststock.wordpress.com/2007/03/01/sqlite-examples-with-bash-perl-and-python/