I just wanted to know that how could I hold the value of a DML(affected rows) using python code.
Suppose a DML is affecting 10 rows so how will I print it using python.
db = psycopg2.connect(dbname=ETL_DB, host=ETL_HOST, port=ETL_PORT, user=ETL_USER, password=ETL_PASSWORD)
cursor = db.cursor()
upd_sql = "update STG01.UPDATE_MINUS_ONE_CTRL_TAB set PROCESS_END_TIME = sysdate"
log.info(upd_sql)
cursor.execute(upd_sql)
## Here I want to print how many rows are getting affected by the above execution...
Thanks in advance.