import pandas as pd
import cx_Oracle
#连接数据库
#user/password@dbname
conn = cx_Oracle.connect('user/***@db_name')
#创建cursor
cursor = conn.cursor()
#执行的SQL语句
sql = """
SELECT *
FROM *******
WHERE *********
"""
#print(sql)
#执行SQL
cursor.execute(sql)
#获取返回内容 fetchall()
result = cursor.fetchone()
#关闭cursor
cursor.close()
#关闭数据库链接
conn.close()