我有以下适用于Python 3.7的代码
query= insert into table (a,b,c) values (%s,%s,%s)( Mysql query)
cursor.execute("SELECT count(*) FROM Test")
Count = cursor.fetchone()[0]
batch_size = 500
for rownum in range(0, Count, batch_size):
conn.execute(
"SELECT * FROM mytable WHERE ROWNUM %s", (Oracle code)
(batch_size, rownum))
for row in cursor:
cursor.execute(query,row)
但是我遇到了错误
DatabaseError:ORA-01036:无效的变量名称/编号。
如何从Oracle DB批量向MySql插入500万条记录?