bigzhu
posted @ Jul 27, 2010 10:08:00 AM
in cx_oracle
, 2627 阅读
使用executemany()
多条插入 INTO TEST (NAME, ID) VALUES ('Mike', 1); INSERT INTO TEST (NAME, ID) VALUES ('Matt', 2); 这样来 cursor.executemany("INSERT INTO TEST (NAME, ID) VALUES(:1, :2)", [{'1': 'Mike', '2':1}, {'1': 'Matt', '2':2}])