Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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()
 
PREVIOUS NEXT
Tagged: #row #sql #database #python #loop
ADD COMMENT
Topic
Name
9+8 =