时间:2021-07-01 10:21:17 帮助过:2人阅读
#export ORACLE_HOME=/opt/instantclient_12_1
#export LD_LIBRARY_PATH=$ORACLE_HOME
import cx_Oracle
conn = cx_Oracle.connect(‘hr/a@192.168.56.101/xe‘)
cursor = conn.cursor ()
cursor.execute ("select * from jobs")
row = cursor.fetchone ()
print (row )
cursor.close ()
conn.close ()
python oracle
标签: