我试图运行executemany
命令,但我无法让我的表格更新。当我在WHERE CLAUSE中有一个参数时,我能够让它工作,但现在我有多个参数,表无法更新。
cur.executemany("""UPDATE orders SET (invested_amount, ex_order_id, \
time_acknowledged, execution_code) = \
(%(invested_amount)s, %(instruct_id)s, current_timestamp, \
%(execution_code)s) WHERE loan_id = %(loan_id)s and \
requested_amount = %(requested_amount)s and execution_code = NULL""",
order_list)
答案 0 :(得分:0)
应该是:
execution_code IS NULL
-- ^^