why do I have to commit explicitly when doing an UPDATE
Posted
by Tshepang
on Stack Overflow
See other posts from Stack Overflow
or by Tshepang
Published on 2010-05-17T09:45:53Z
Indexed on
2010/05/17
9:50 UTC
Read the original article
Hit count: 252
Here's my code:
import cx_Oracle
conn = cx_Oracle.connect(usr, pwd, url)
cursor = conn.cursor()
cursor.execute("UPDATE SO SET STATUS='PE' WHERE ID='100'")
conn.commit()
If I remove the conn.commit()
, the table isn't updated. But for select statements, I don't need that conn.commit()
. I'm curious why?
© Stack Overflow or respective owner