# 현재 DB를 SQL 쿼리 형식으로 리턴
import sqlite3
conn = sqlite3.connect(r'C:\Temp\test.db')
cur = conn.cursor()
for row in conn.iterdump():
print(row)
----------------------------------------------------------
BEGIN TRANSACTION;
CREATE TABLE Score(nation, point);
INSERT INTO "Score" VALUES('kr',90);
INSERT INTO "Score" VALUES('jp',80);
INSERT INTO "Score" VALUES('cn',85);
INSERT INTO "Score" VALUES('cn',85);
COMMIT;
'Python > SQLite' 카테고리의 다른 글
sqlitestudio download (0) | 2019.01.24 |
---|---|
[Python] SQLite3 distinct 중복제거 (0) | 2018.08.15 |
[Python] SQLite3 Cursor.executemany() - iterator를 이용한 레코드 추가 (0) | 2018.05.18 |
[SQLite3] 내장 집계함수 (max, min, avg, sum) (0) | 2018.05.18 |
[Python] API SQLite (0) | 2018.04.23 |