I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this.

In psuedo code the logic is as follows:

select_stmt = db.execute("SELECT * FROM people")
# use some, but not all of the rows in select_stmt
create_stmt = db.execute("CREATE TABLE other (a,b)") # error: database table is locked


Why does this happen?

Anyway around this?

-Charlie



Reply via email to