Expensive, good night.
Personal I made the connection to the database and I need to compare two tables tab1 and tab2 so that the external "for" fix the first line of "tab1" in column zero and the "for" internal scrolls all the lines of the column one of tab2 so on until comparing the last row of tab1 with the last tab2 I tried to mount here but not correct could anyone help? Thank you.
import pyodbc
conn = pyodbc.connect("DRIVER={SQL Server};Server=localhost;database=teste;uid=;pwd=")
cursor = conn.cursor()
cursor.execute('select * from tab1')
cursor.execute('select * from tab2')
for row in cursor.fetchall():
print (row[0])
for row in cursor.fetchall():
print (row[1])