Host="127.0.0.1"
user="root"
pwd='123456'
port=3306
database='demo'
conn=pymysql.connect(host=Host,user=user,password=pwd,port=port,db=database)
cursor=conn.cursor()

for i in range(1,1000):
    data=cursor.execute(f"insert into netease_user (fName,passwd,fID) values ('test{i}','123456',{i})")

conn.commit()

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐