标签:exe sql select fetchall nec close connect pytho ott
1 #!/usr/bin/env python 2 # -*- coding: UTF-8 -*- 3 #@contact: 1960050004@qq.com @time: 2018/9/2 21:36 4 import cx_Oracle 5 conn=cx_Oracle.connect(‘scott/a123@192.168.2.221/orcl‘) 6 c=conn.cursor() 7 sql = "select * from emp" 8 c.execute(sql) 9 for x in c.fetchall(): 10 for value in x: 11 print value 12 c.close() 13 conn.close()
标签:exe sql select fetchall nec close connect pytho ott
原文地址:https://www.cnblogs.com/woailifang/p/9575771.html