import sqlite3
这是python内置的,不需要pip install 包
数据库里面有很多张表
要操作数据库首先要连接conect数据库
mydb=sqlite3.connect("alfw.sqlite...")
然后创建游标cursor来执行executeSQL语句
cursor=mydb.cursor()
比如我想看这个数据库的几张表的名字是什么
cursor.execute("SELECT name...FROM sqlite_master WHERE type='table';")
Tables=cursor.fetchall()
print(Tables)
>>>[('Faces',), ('sqlite_sequence...',), ('FacePose',), ('FaceImages',), ('Databases',), ('FaceMetaData',), ('sqlite_stat1',), ('FaceRect...是表结构理解
CREATE TABLE sqlite_master (
type TEXT,
name TEXT,
tbl_name