3的pymysql 2的MySQLDB
python
coon=pymysql.connect()
cursor = coon.cursor() cursor = pymysql.cursors.DictCursor
cursor.execute(sql)
cursor.fetchone() fetchmany(2) fetchall
cursor.scroll(1, mode="relative")
coon.commit()
cursor.close()
coon.close()
事务