sqlite3 删除数据

cx = sqlite3.connect("c:/数据库地址")  # 打开数据库
cu = cx.cursor()
# delete the row
cu.execute("delete from user where username=='majuan'")
# Save (commit) the changes
cx.commit() # 提交
cx.close() # 关闭
posted @ 2017-10-25 15:24  任飞儿  阅读(565)  评论(0编辑  收藏  举报