Guest User

Untitled

a guest
Nov 14th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import pyodbc
  2. cnxn = pyodbc.connect("Driver={SQL Server Native Client 11.0};"
  3. "Server=server_name;"
  4. "Database=db_name;"
  5. "Trusted_Connection=yes;")
  6.  
  7.  
  8. cursor = cnxn.cursor()
  9. cursor.execute('SELECT otp FROM Table')
  10.  
  11. for row in cursor:
  12. print('row = %r' % (row,))
Add Comment
Please, Sign In to add comment