Python 数据库操作
来源:互联网 发布:杀出重围 知乎 编辑:程序博客网 时间:2024/05/21 19:44
import MySQLdbconn=MySQLdb.connect(host='localhost',user='root',passwd='2077230',port=3306)conn.select_db('dept')cur=conn.cursor()value=[0,'hi rollen']cur.execute('insert into dept values(%s,%s)',value)conn.commit()count=cur.execute('select * from dept')print 'there has %s rows record' % countresult=cur.fetchone()print resultresults=cur.fetchmany(5)for r in results: print r
- Python操作Mysql数据库
- python的数据库操作
- python操作数据库
- python SQlite数据库操作
- python操作MySQL数据库
- python操作MySQL数据库
- python操作数据库
- Python 数据库操作
- python操作MySQL数据库
- python操作MySQL数据库
- python操作MySQL数据库
- Python 操作Oralce数据库
- python操作MySQL数据库
- python数据库操作
- Python操作Oracle数据库
- python操作MySQL数据库
- python操作MySQL数据库
- python操作MySQL数据库
- 2012-12-12 - 12-14 11gR2 "2 Day + Performance Tuning Guide" page 52 - 168
- 成长路
- 新的开始-写在毕业的季节
- 【Android游戏开发十二】(保存游戏数据 [上文])详解SharedPreference 与 FIleInputStream/FileOutputStream将数据存储到SD卡中!
- 读书笔记《30天自制操作系统》day08
- Python 数据库操作
- x264中get_frame_total_yuv函数欣赏(顺便复习和巩固fseek函数和ftell函数的用法)
- 第26节 Get和Set方法
- wireshark使用
- mt.exe:general error c101008d(最终原因已查明)
- LINUX下的udev详解(转)
- 再谈shell之“>/dev/null 2>&1”
- 阿越-临江仙:见《十字-声名雀起》
- Sql Server触发器