有没有办法在python mysql中进行大量分配?
我拥有所有这些数据:
uniqueId = user_profile[1]
userName = user_profile[2]
email = user_profile[3]
password = user_profile[4]
salt = user_profile[5]
firstName = user_profile[6]
middleName = user_profile[7]
lastName = user_profile[8]
gender = user_profile[9]
birthDate = user_profile[10]
counter = user_profile[11]
avatarId = user_profile[12]
coverPhoto = user_profile[13]
status = user_profile[14]
welcome = user_profile[15]
joinDate = user_profile[16]
notification = user_profile[17]
并手动插入
insert = """INSERT INTO table (uniqueId.....) into (%d.....)""" % (uniqueId.....)
........execute
........commit
会有很多编码,我也需要为很多表格做这件事 或者有没有办法建立插入?