SQlite3 - Delete row by rowid

Viewed 7562

I'm currently building a small web app with Flask and I'm using SQLite3 as database. I want to implement a feature to delete rows in the database. To do that I have to select/delete the row by the standard rowid that SQLite3 is giving every row, but I don't know how to do that.

I know you can get the rowid of a row by:

SELECT rowid, * FROM table;

but I don't know how to reverse that.

1 Answers

If you want to delete a row by its rowid, it is very straight forward, e.g.

  delete from mytable where rowid=1;
Related