1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] sqlite query works form db viewer but not form python

Discussão em 'Python' iniciado por Stack, Setembro 13, 2025.

  1. Stack

    Stack Membro Participativo

    I run this query from DB Browser for SQLite:

    DELETE FROM ticket WHERE ROWID = (SELECT MAX(ROWID) FROM ticket);


    and it works fine with no errors. Then, from a Python program:

    connection.execute("DELETE FROM ticket WHERE ROWID = (SELECT MAX(ROWID) FROM ticket)")


    runs with no errors but has no effect. What am I missing?

    I have been looking at the SQLite explicit row id concept, but can't see how it applies to Python connections.

    Continue reading...

Compartilhe esta Página