1 | Python连接数据库: |
1 | 模糊查询库里的表名 |
cursor.executemany()
sql = “insert into myTable (created_day,name,count) values(%s,%s,%s) ”
args=[(“2012-08-27”,”name1”,100),(“2012-08-27”,”name1”,200),(“2012-08-27”,”name2”,300)]
cursor.executemany(sql, args)
args为列表格式
思维导图网址:
https://www.processon.com/view/link/5cd42958e4b09a3e45bd6a52