import sqlite3
conn = sqlite3.connect('boo2.db')
c = conn.cursor()
x = c.execute("SELECT * FROM sqlite_master where type='table'")
for y in x:
print(x)
输出是
********************************
<sqlite3.Cursor object at 0x00272DE0>
Process finished with exit code 0
**************************************
但不是任何table...如何获取表名?
1条答案
按热度按时间8yparm6h1#
你需要从查询中获取结果: