1. 首页
  2. 移动开发
  3. 其他
  4. Python MySQL进行数据库表变更和查询

Python MySQL进行数据库表变更和查询

上传者: 2020-12-17 13:48:36上传 PDF文件 36.64KB 热度 13次
Python连接MySQL,进行数据库表变更和查询: python mysql insert delete query: #!/usr/bin/python import MySQLdb def doInsert(cursor,db): #insert # Prepare SQL query to INSERT a record into the database. sql = "UPDATE EMPLOYEE SET AGE = AGE+1 WHERE SEX = '%c'" %('M') try: cursor.execute(sql) db.commi
用户评论