From your own link: http://www.oracle.com/technetwork/articl...05.html#t7
Using
Quote:import cx_Oracle con = cx_Oracle.connect('pythonhol/[email protected]/orcl') cur = con.cursor() cur.prepare('select * from departments where department_id = :id') cur.execute(None, {'id': 210}) res = cur.fetchall() print res cur.execute(None, {'id': 110}) res = cur.fetchall() print res cur.close() con.close()
Using
:1
might work for a tuple of params, but it looks like the recommended way is to use named params with a dict.