excel转换成特定SQL文件然后导入数据库。这里去重,可以考虑一张临时表。然后插入数据可以使用如mysql的ignore:insert ignore into table_main(id,phone,other)select id,phone,other from table_temp_uuid;引用来自...
id,birth_date)values '''for i in rows:a+ia=a[:1]cursor1=conn.cursor()cursor1.execute(a)cursor1.close()conn.close()print('成功导入数据至数据库.')del adel rows 如果你的数据来源是线上文件(存在数据库) 1...