查询编码格式
查询语句:SELECT  COLLATIONPROPERTY('Chinese_PRC_Stroke_CI_AI_KS_WS', 'CodePage');
查询结果:
936 简体中文GBK
950 繁体中文BIG5
437 美国/加拿大英语
932 日文
949 韩文
866 俄文
65001 unicode UFT-8
连接
安装
pip install pymssql
使用
import pymssql #引入pymssql模块


def conn():
    connect = pymssql.connect('(local)', 'sa', '**********', 'test', charset='GBK') #服务器名,账户,密码,数据库名
    if connect:
        print("连接成功!")
    return connect


if __name__ == '__main__':
    conn = conn()
查询
cursor = connect.cursor()
cursor.execute('select * from tablesName')
row = cursor.fetchall()
参考链接

https://www.cnblogs.com/zzy567/p/9086753.html
https://www.cnblogs.com/toheart/p/9802990.html

相关文章:

  • 2022-12-23
  • 1970-01-01
  • 2021-07-04
  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案