Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyodbc
- cnxn = pyodbc.connect("Driver={SQL Server Native Client 11.0};"
- "Server=server_name;"
- "Database=db_name;"
- "Trusted_Connection=yes;")
- cursor = cnxn.cursor()
- cursor.execute('SELECT otp FROM Table')
- for row in cursor:
- print('row = %r' % (row,))
Add Comment
Please, Sign In to add comment