Oliver Peters wrote, On 1/16/2012 1:02 PM:
Am 16.01.2012 19:59, schrieb Bill McCormick:
James Pearson wrote, On 1/16/2012 12:28 PM:
If it's just for setting up databases, tables, etc, why not just use a
sql script?

Throw all your database object creation sql into a file and then
execute that file from within sqlite using the ".read FILE" command.

I think this is what I'm looking for. Is there some way to have sqlite3
execute a .read FILE command from a bash prompt?



sqlite3  yourdb.db3 < yoursql.sql

Even better.

Looks like pipes work as well (cat yoursql.sql|sqlite3  yourdb.db3).

Also, can I safely delete the database file (yourdb.db3, using your example) if I just want to start again? It appears that I can.

Where are these little nuggets documented?

Thanks!!
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to