Once report is created using data from database how to delete that database table using python script

Hello,

Using script I am inserting data in database table and after that, I am using that data from the database to generate the report. But once the report is created and printed I wanna delete that chunk of data from the database which was used to create the report. How can I achieve this using python script?

Are you wondering how to structure a DELETE statement in SQL or how to run that statement in a python script?

runQuery() can be used to delete data. If you’re looking for how to structure the query itself, the form is
DELETE FROM <table_name> WHERE <condition> ;
Make sure you have legacy db access turned on to do this.