Use connection.commit() method to save data in Oracle Database using Python. The below is an example:
Save Data in Oracle Database Using Python Example
In the following Python program, it will create the connection using the cx_Oracle library in variable CONN and then will execute an update statement to update EMP table's comm column. After that, before closing the Oracle database connection, it will save the changes using the COMMIT() method.
import cx_Oracle conn = cx_Oracle.connect("scott", "tiger", "localhost:1521/orcl") cur = conn.cursor() cur.execute('update emp set comm = sal * 10 / 100') conn.commit() cur.close() conn.close()