开发者社区> 问答> 正文

python怎么连接oracle

python怎么连接oracle

展开
收起
云计算小粉 2018-05-10 20:10:38 1645 0
1 条回答
写回答
取消 提交回答
  • import cx_Oracle
    
    print(cx_Oracle.clientversion())
    conn = cx_Oracle.connect("用户名/密码@服务器地址/服务器名")
    cursor = conn.cursor()
    cursor.execute("select address from temp_m_customer_addr_info where ID = '103791721'")
    row = cursor.fetchone()
    print(row)
    
    cursor.close()
    conn.close()
    2019-07-17 22:21:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_樊文凯_ORACLE数据库和应用异构迁移最佳实践 立即下载
PostgresChina2018_王帅_从Oracle到PostgreSQL的数据迁移 立即下载
Oracle云上最佳实践 立即下载

相关镜像