PYMSSQL

mail@pastecode.io avatar
unknown
python
2 years ago
337 B
3
Indexable
Never
#!/usr/bin/env python3

import pymssql  
conn = pymssql.connect(server='RemoteSupport', user='sa', password='XXXXXXXXXXXX')  
cursor = conn.cursor(as_dict=True)
cursor.execute('SELECT top 10 * FROM sysobjects;')  
row = cursor.fetchone()  
while row:  
    print(row)
    print('\n')
    row = cursor.fetchone()

conn.close()