📜  sql数据库python循环中的for行 - SQL代码示例

📅  最后修改于: 2022-03-11 15:05:25.610000             🧑  作者: Mango

代码示例1
import sqlite3
conn = sqlite3.connect('file.txt') 
cur = conn.cursor()
cur.execute('''
CREATE TABLE Table (first TEXT, second INTEGER)''')
    #Do things with Table
for row in cur.execute('SELECT * FROM Table') :
    print(row)
cur.close()