> No, that seems to work fine. I guess the table is locked for a > specific transaction, so you cannot have any problems with a lock held > by the very same transaction. > > > ie Below would return "database table is locked"? > > > > BEGIN TRANSACTION > > SELECT * from table1 WHERE col > x > > UPDATE table1 SET col = ... > > INSERT INTO table1 .... > > COMMIT TRANSACTION > > Just try it with the command line tool sqlite3. Works fine here.
I expect that works only because all the results of the SELECT were retrieved before the UPDATE was executed. Interleaving the UPDATEs/INSERTs with the SELECT would probably cause the error. -Tom