Answers for "python for loop get row sql"

SQL
0

for row in sql database python loop

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()
Posted by: Guest on December-31-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language