使用python语言连接Oracle数据库配置 #coding:utf-8 import cx_Oracle as oracle db=oracle.connect('root/123456@192.168.1.2:1521/orcl')#数据库连接 cursor=db.cursor()#创建cursor cursor.execute("select id from student where card_num='320924197106241424' ")#执行sql语句 rs=cu…
以oracle的scott账户:找到员工表中薪水大于本部门平均薪水的员工为例 多表查询方式: select e.empno, e.ename, e.sal, d.avgsal from emp e, (select deptno, avg(sal) avgsal from emp group by deptno) d where e.deptno = d.deptno and e.sal > d.avgsal ; 执行结果 相关子查询方式: select empno, ename, sal, (…
1.查询SCOTT表中有多少表,并显示表的一些描述select * from all_tables WHERE owner='SCOTT' ; 2.查询oracle数据库版本select * from v$version; select version from v$instance; select version FROM Product_component_version;…
python连接oracle -- qlalchemy import cx_Oracle as co import pandas as pd from sqlalchemy import create_engine sql_select = ''' ...''' db = create_engine('oracle://qmcb:qmcb@localhost:1521/tqmcbdb') #test_data = pd.read_excel("data/tmp001.xlsx")…