用Python语句创建sQLite数据库,代码如下:
import sqlite3 conn= sqlite3.connec("test2.db") c=conn.cursor() c.execute("CREATE TABLE STUDENTS(ID INT,AGE INT,NAME TEXT)") c.execute("INSERT INTO STUDENTS(ID, AGE,NAME) VALUES(2,16,'LISA')") c.execute("UPDATE STUDENTS set AGE=18 where it,ID=2") conn.commit() c.close() conn.close()
程序运行后,AGE列的值是?
2
16
LISA
18