update query execution in python
<p>I am executing this query on sql developer and it is working fine</p>

<pre><code>update TABLE_X set COL_SID='19' where ID='1';
</code></pre>

<p>But when I am doing this via python code </p>

<pre><code>cur=conn.cursor()
updt_query='update TABLE_X set COL_SID=? where ID=?'
cur.execute(updt_query,('19','1'))
cur.close()
</code></pre>

<p>I am getting error</p>

<pre><code>cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
</code></pre>

<p>Please let me know where I am doing the mistake.</p>

<p>Could be the ID are number and not string so  you should use  </p>

<pre><code> cur.execute(updt_query,(19,1))
</code></pre>

python sql oracle