Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pymssql
- server = 'hostname.domainname'
- database = 'mydb'
- username = 'myuser'
- password = 'mypass'
- conn = pymssql.connect(server, username, password, database)
- cursor = conn.cursor(as_dict=True)
- cursor.execute('select 6 * 7 as [Result];')
- for row in cursor:
- print row['Result']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement