Home > Software engineering >  Is dropping multiple tables from an sqlite3 database possible?
Is dropping multiple tables from an sqlite3 database possible?

Time:12-10

I was trying to drop multiple tables from a database with the syntax: `

DROP TABLE IF EXISTS B,C,A;

But this produces a syntax error. A comment mentioned enclosing names within backticks, that didn't work either. `

    cur.execute("DROP TABLE IF EXISTS `meta`,`urls`;")
sqlite3.OperationalError: near ",": syntax error

`

CodePudding user response:

You have to issue a drop statement for each table.

  • Related