代码
sql = """insert into 'user'('id','username''password','nick_name','user_photo','user_sex','account_balance') values """ for index in range(0,100000): sql = sql + """(null,'{0}','1','测试账户{1}',null,null,0),""".format(138+index,index) print(sql)
f = open(r"E:/23456.txt","w",encoding = "utf-8") f.write(sql) f.close()
执行
标签:脚本,index,py,测试数据,user,sql,null From: https://www.cnblogs.com/huhuqueshi/p/17496508.html