# -*- coding: cp932 -*- # mysqlの操作サンプル #easy_install mysql-connector-python import mysql.connector try: cnn = mysql.connector.connect(host='localhost', port=3306, db='Sample001', user='root', passwd='root', charset="cp932") cur = cnn.cursor() #試験データの整理 pref_cd = 100 cur.execute("""DELETE FROM t01prefecture WHERE PREF_CD >= %s""" , (pref_cd,)) cnn.commit() print("単純なSELECT文=========================