On 02/21/2013 11:10 PM, eryksun wrote:
On Thu, Feb 21, 2013 at 8:47 PM, Jim Byrnes <[email protected]> wrote:cur.execute("delete from pwds where Account='xMe' limit 1")If you need a alternate way to limit the delete, try the following, for which the limit is on a select query: cur.execute(''' delete from pwds where rowid in ( select rowid from pwds where Account='xMe' limit 1) ''')
Thanks for all the info. I ran your tests and my version of sqlite3 is indeed not compiled to use LIMIT. After I sent the email I was wondering about using rowid. Thanks for confirming it with an example.
Regards, Jim _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
