我改变了几件事让它为我工作。在
1-将infotext_list更改为mappings or sequences的列表infotext_list = [("abc",), ("bcd",), ("def",)] notice the extra , inside the ()
或者
^{pr2}$
2-换衣服?to be:value,如果您想使用映射;或者:1(或任何其他:name)如果您想要使用序列
这两个对我都有用infotext_list = [("abc",), ("bcd",), ("def",)]
insert_stmt = 'INSERT INTO data_table (...) SELECT ... FROM other_table WHERE SOMETHING = :1 '
curs.executemany(insert_stmt, infotext_list)
infotext_list = [{'value':"abc"}, {'value':"bcd"}, {'value':"def"}]
insert_stmt = 'INSERT INTO data_table (...) SELECT ... FROM other_table WHERE SOMETHING = :value '
curs.executemany(insert_stmt, infotext_list)
我有一篇关于使用cxu Oracle进行crud操作的简要介绍here。在