I have a table that has millions of rows. I want to delete multiple rows via an in clause. However, using the code:
Delete from users where id in ()
Yep! You can call
delete() on the table object with an associated whereclause.
Something like this:
stmt = Users.__table__.delete().where(Users.id.in_(subquery...))
(and then don't forget to execute the statement: