# 查询示例 # 引入支持 import sqlite3 # 打开数据库 conn = sqlite3.connect('data.db') c = conn.cursor() sql = "SELECT * FROM 数据表 WHERE name = '名字';" cursor = c.execute(sql) for row in cursor: print(row) conn.commit() conn.close()
Tamshen