I was able to execute the delete SQL query in Python with pypyodbc as below
cur.execute("delete from table_a where a ='a';").commit()
However, I failed to run the delete SQL with a subquery
cur.execute("delete from table_a where a in ( select a from table_b );").commit()
will return
pypyodbc.Error: ('HY010', '[HY010] [unixODBC][Driver Manager]Function sequence error')
How could I run a delete SQL with subquery?