How to get table names using sqlite3 > PYTHON 프로그래밍

본문 바로가기

PYTHON 프로그래밍

PYTHON 프로그래밍

3. How to get table names using sqlite3

페이지 정보

작성자 관리자 댓글 0건 조회 6,465회 작성일 19-03-24 15:29

본문

3. How to get table names using sqlite3

import sqlite3
 
conn = sqlite3.connect("test.db") 


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




Copyright © LEELAB.CO.KR. All rights reserved.