import pymysql
zwy = pymysql.connect(host='localhost', user='root', password='123456789', db='world')
cursor = zwy.cursor()
zwy.commit()
delete_sql = 'delete from student where sname=%s'
cursor.execute(delete_sql, 'renji')
select_sql = '''select*from student;'''
cursor.execute(select_sql)
zwy.commit()
print(cursor.fetchall())
zwy.close()
© 版权声明
THE END
暂无评论内容