Python/Python Programming

[ Python ] cx_Oracle을 이용한 oracle 연결

Pydole 2022. 6. 27. 23:10

 

 

Installing oracle module

 

pip install cx_Oracle

 

 

 

Example

 

import cx_Oracle

conn = cx_Oracle.connect('userid','password','host/sid')
cursor = conn.cursor()
cursor.execute(' ')

rows = cursor.fetchall()

print(row)

cursor.close()
conn.close()