How to get table names using sqlite3 through python? [duplicate] How to get table names using sqlite3 through python? [duplicate] sqlite sqlite

How to get table names using sqlite3 through python? [duplicate]


You can use this query to get tables names.

res = conn.execute("SELECT name FROM sqlite_master WHERE type='table';")for name in res.fetchall():    print(name[0])