On Thu, Jan 19, 2017 at 9:24 AM, Igor Korot <[email protected]> wrote: > Is it possible to write something like this: > > sqlite3_prepare_v2( m_db, "BEGIN TRANSACTION; CREATE TEMP TABLE temp > AS SELECT * FROM mytable; DROP TABLE mytable; CREATE TABLE mytable(id > INTEGER PRIMARY KEY, name TEXT PRIMARY KEY, salary INTEGER); INSERT > INTO mytable SELECT * FROM temp; DROP TABLE temp; COMMIT;", -1, &stmt, > NULL ); > > or I will have to issue multiple single SQL statements?
You could use sqlite3_exec(), which is internally just going to issue multiple single SQL statements. -scott _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

