[Tutor] sqlite3 does it support limit in a delete clause?

eryksun eryksun at gmail.com
Fri Feb 22 10:33:10 CET 2013


On Thu, Feb 21, 2013 at 10:41 PM, eryksun <eryksun at gmail.com> wrote:
> However, I'm surprised it's disabled in Ubuntu since Debian's
> Python 2.7.3 has it.

I took a moment to look at the changelogs. The option to use LIMIT
with DELETE was added in SQLite 3.6.4 (Oct 2008):

http://www.sqlite.org/changes.html#version_3_6_4

  * Add option support for LIMIT and ORDER BY clauses on DELETE and
    UPDATE statements. Only works if SQLite is compiled with
    SQLITE_ENABLE_UPDATE_DELETE_LIMIT.

Windows Python 2.7.3 ships with SQLite version 3.6.21 (Dec 2009).
Windows Python 3.3 uses version 3.7.12 (May 2012), but it isn't
compiled with the above option.

Ubuntu 12.04 uses version 3.7.9 (Nov 2011) of the libsqlite3-0
package. However, it wasn't compiled with the needed option until
package version 3.7.9-3 (Jan 2012):

http://changelogs.ubuntu.com/changelogs/pool/main/s/sqlite3/sqlite3_3.7.13-1/changelog

  * Enable LIMIT support for UPDATE and DELETE commands (closes:
    #649169).

Ubuntu 12.10 (quantal) uses version 3.7.13 (Jun 2012), the same
version I have on Debian Wheezy.

http://packages.debian.org/changelogs/pool/main/s/sqlite3/sqlite3_3.7.13-1/changelog


More information about the Tutor mailing list