Java代码
- import sqlite3 as sql
- con=sql.connect('e:/testdb')
- cur=con.cursor()
- cur.execute('create table users(login varchar(8),id integer)')
- cur.execute('insert into users values("jhon",11)')
- cur.execute('select * from users')
- for u in cur.fetchall():
- print u
- cur.close()
- con.commit()
- con.close()