sqlite3 查询表

cx = sqlite3.connect("c:/数据库地址")  # 打开数据库
cu = cx.cursor()
# query the table
rows = cu.execute("select * from user")
# print the table
for row in rows:
print(row)
cx.commit() # 提交
cx.close() # 关闭
posted @ 2017-10-25 15:19  任飞儿  阅读(372)  评论(0编辑  收藏  举报