On 16 Jul 2011, at 9:30pm, Kevin Martin wrote: > If I run an update query which has a subquery, will the database be > locked before the subquery is run.
Yes. The transaction does the locking. The transaction encloses the entire UPDATE. If you want to do the SELECT yourself as a separate statement, and make sure it's valid, you can specify your own transaction using "BEGIN IMMEDIATE' before your SELECT. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users