Igor Korot wrote:
> 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?

To quote <http://www.sqlite.org/c3ref/prepare.html>:
| If pzTail is not NULL then *pzTail is made to point to the first byte
| past the end of the first SQL statement in zSql. These routines only
| compile the first statement in zSql, so *pzTail is left pointing to
| what remains uncompiled.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to