📜  python mysql executemany - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:57.304000             🧑  作者: Mango

代码示例1
Copied data = [
  ('Jane', date(2005, 2, 12)),
  ('Joe', date(2006, 5, 23)),
  ('John', date(2010, 10, 3)),
]
stmt = "INSERT INTO employees (first_name, hire_date) VALUES (%s, %s)"
cursor.executemany(stmt, data)