프로그래밍/Python

[oracleDB] python cx_Oracle 오라클DB 연결

돔돔이 2021. 4. 14. 23:41
728x90
반응형

 

 

 

 


import cx_Oracle
import os

os.putenv('NLS_LANG", 'KOREAN_KOREA.KO16MSWIN949')

connection = cx_Oracle.connect("<username>", "<password>", "<ip>/<sid>")

cursor = connection.cursor()



## execute는 mysql과 동일함

cursor.execute("show tables")
728x90
반응형