所有的 SQLite 语句可以以任何关键字开始,如 SELECT、INSERT、UPDATE、DELETE、ALTER、DROP 等,所有的语句以分号(;)结束。...Python 2.5x以上版本内置了SQLite3,使用时直接import sqlite3即可,而SQLite3 模块是由 Gerhard Haring 编写的。...建立数据库表:
cursor.execute(‘create table student(id int PRIMARY KEY,name text,age int)’)
注意:python2好像不能使用以下语句建立表...SQLite3更新语句
cursor.execute(“update student set id=0 where age =22 ”)
>>> cursor.execute("update student...0x7f1eb1ed1450>
>>> cursor.fetchall()
[(0, u'zhangsan', 22), (1, u'lisi', 24), (3, u'wangwu', 25)]
也可以使用以下语句更新