Data/OracleDB1 python oracleDB crud 코드 import cx_Oracle import traceback # 조회 def select(): try: conn=cx_Oracle.connect("test/1234@localhost:1521/xe") cur=conn.cursor() #커서 생성 sql="select * from employee order by employee_id" cur.execute(sql) for row in cur: for i in range(len(row)): if i==3: description=row[3].read() #CLOB필드 읽는 방법 print(row[i], end=" ") print() except BaseException as e: print(traceback.format_exc()) finally: cur.cl.. 2020. 9. 11. 이전 1 다음