cx_Oracle例子,经典

import cx_Oracle
conn=cx_Oracle.connect ('ylch/youlian@unionmon')
curs=conn.cursor ()
sql='select * from tab'
rr=curs.execute (sql)
for tabname,TNAME,ll in curs.fetchall():
    print tabname,TNAME,ll
curs.close()
conn.close()