擅长:python、mysql、java
<p>我不确定,但我不认为您可以在表名或列名上使用绑定变量。。。在</p>
<p>试试看</p>
<pre><code>curs.execute("INSERT INTO ? VALUES (?,?)", (testTable, c1, c2))
</code></pre>
<p>我敢打赌这行不通。在这种情况下,您需要避免在表名或列名上使用<code>?</code>。我宁愿使用连接运算符来连接字符串,就像在Java中它是“+”。例如(Java风格):</p>
^{pr2}$