【发布时间】:2019-08-06 19:09:01
【问题描述】:
我可以使用以下代码遍历 python 对象,但是我希望能够为模式和表名使用占位符,通常我使用 {}.{} 和 .format() 方法来执行此操作,但是如何做你把两者结合起来了吗?
cur.executemany("INSERT INTO schema.table_name (x,y,z) "
"values (%s, %s, %s)", top_sample)
【问题讨论】:
标签: python executemany