On Tue, Mar 22, 2011 at 1:04 AM, Erich93063 <erich93...@gmail.com> wrote:
> I am trying to create a SQLite database if it doesn't exist, which I > know I can use 'CREATE TABLE IF NOT EXISTS", but more importantly, I > need to initially populate the database with seed data if it doesn't > exist. If I use CREATE TABLE IF NOT EXISTS, it will obviously create > the table if it doesn't exist, but if I follow that up with insert > statements, those would ALWAYS get ran. I only want to enter the seed > data if the database does not exist. ??? > > Maybe something like CREATE TABLE IF NOT EXISTS [newTable] AS SELECT * FROM DataToPopulate DataToPopulate can be a table from the db or temporary table created for example when the program starts. Max Vlasov _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users