发布时间:2019-08-29 07:39:36编辑:auto阅读(1596)
Lite:清淡的, 低盐的轻,清淡:相比其他事物内容较少,重量较轻或卡路里含量较低
1) 创建数据库:
sqlite3 test.db
--> SQLite version 3.8.2 2013-12-06 14:53:30
create table Employee(
ID INTERGER PRIMARY KEY,
Name VARCHAR(12)
);
insert into "Employee" values(50000001,"MIKE");
.help
.quit
创建好test.db后,再一次执行sqlite3 test.db不会覆盖上面建立的test.db
2)Python使用
import sqlite3
#cnx = mysql.connector.connect(user='root',password=xxx',host='127.0.0.1',database='test')
cnx = sqlite3.connect('/home/xxx/workspace/FourthDj/test.db')
cur = cnx.cursor()
cur.execute('select * from employee')
allRecords = cur.fetchall()
print(allRecords)
47879
46443
37333
34772
29344
26007
24960
19976
19578
18074
5821°
6448°
5962°
5987°
7093°
5937°
5977°
6471°
6435°
7817°