This repository has been archived on 2026-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RequestCounter/bin/tests/fetchtable.py
T

18 lines
388 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/26
# @File Name: fetchtable.py
import sqlite3
conn = sqlite3.connect('../db/data.db')
cursor = conn.cursor()
cursor.execute('select * from sqlite_master where type="table"')
tables = []
for i in cursor.fetchall():
tables.append(i[1])
print(tables)