通过使用 Python 和 cx_Oracle,我正在尝试向表中插入行。
con = cx_Oracle.connect(ORACLE_USER+'/'+PASS+'@'+TNS)
cursor = con.cursor()
...
try:
cursor.executemany("INSERT INTO table(ID,NAME) VALUES(...)"
except cx_Oracle,exc:
error ,=exc.args
print error.code
print error.message
cursor.close()
con.close()
从输入文件中插入所有行后,通过使用 cx_Oracle 中的选择查询,我可以看到插入的行。但是,当我输入“select * from table;”时,sqlplus 没有给出任何结果。我是否错过了 cx_Oracle 的某些内容,或者 oracle 客户端中是否有一个缓冲区在连接到远程数据库时显示 sqlplus 的旧结果?