# -*- coding: utf-8 -*- import pymssql conn=pymssql.connect(host=".",user="sa",password="",database="UFDATA_001_2013",charset="utf8") #conn=pymssql.connect(host="kzxserver",database="UFDATA_001_2014",trusted=True) cur=conn.cursor() cur.execute(‘SELECT * FROM code‘) row = cur.fetchall() for crow in row: print (crow)
python 连接MSSQL
时间: 2024-11-03 21:54:46