对于oraclesql,我有一个看起来很直接的insert语句。它在oraclesqldeveloper中可以正常工作,但是同一个命令在Python中不起作用
cx_Oracle.DatabaseError: ORA-00933: SQL command not properly ended.
这种情况发生在光标.执行()打电话。查询本身是:
^{pr2}$如果在sqldeveloper中运行,我会得到一个新行。在Python中,我得到了终止错误。据我所知,它的形成和终止都是正确的。在
下面是我如何在python中构造查询:
sql = "insert into TestNamesTable (TestName, TheUser, TheProject) values ('%s', '%s', '%s');" % (diagname, username, project)
print sql
cursor.execute(sql)
connection.commit()
试试这个:
相关问题 更多 >
编程相关推荐