sqlite iterdump
-
[Python] sqlite3 iterdump( ) - SQL 쿼리 형식으로 데이터베이스를 덤프Python/SQLite 2019. 1. 2. 20:10
# 현재 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',8..