sql_insert=""" Insert into DIRECTOR (name,secondName) values (:1,:2) """
name='Tom'
second_name='Musk'
data=[name,second_name]
try:
cur.execute(sql_insert,data)
except Exception as err:
print('Error DIRECTOR',err)
else:
conn.commit()
I want to print what is inserting to my database. Like in this case i want to see: Insert into DIRECTOR (name,secondName) values ('Tom','Musk')
I tried to print it like this print(cur.fetchall()) and any different metods but no one is working.
source https://stackoverflow.com/questions/71683570/python-oracle-cx-how-to-check-what-is-being-inserted
Comments
Post a Comment