Python连接Oracle,pythonoracle,python 3.4.3
Python连接Oracle,pythonoracle,python 3.4.3
python 3.4.3cx_Oracle``` python
!/usr/bin/env python
import timestart = time.clock()
import cx_Oracletns = cx_Oracle.makedsn('127.0.0.1', '1534', 'dsn')db = cx_Oracle.connect('username', 'password', tns)def sqlSelect(sql, db): cur=db.cursor() cur.execute(sql) result=cur.fetchall() cur.close() return result
sql_1 = " "sql_2 = " "sql_3 = " "
sql_list = [sql_1, sql_2, sql_3]for sql in sql_list: result = sqlSelect(sql, db) print(result[0][0])
end = time.clock()
print("\nRunning time: %f s" % (end - start))```
相关内容
- python socket之tcp服务器与客户端示例,pythonsocket,作者:
- 删除文件夹中几天前的文件,删除文件夹几天前,#!/us
- python连接sql server数据库,pythonsql,首先,到http://p
- python通过urllib2提交http post请求,pythonurllib2,python通过
- python实现二叉树的创建和遍历,python实现二叉树,#codi
- 爬前100期双色球中奖号码,从中随机出下一期中奖号码
- Python获取Linux系统内存情况,pythonlinux,[Python]代码
- 分形图,,#!/usr/bin/e
- 选择打开选择文件 神龙 QQ29295842,神龙qq29295842,#!/usr/
- Python 调用 C++,python调用,#include <bo
评论关闭