cursor.execute("select name from v
代码语言:javascript复制import cx_Oracle as cx
con = cx.connect('ncc2020_0609', 'sys', '10.10.xx.xx:1521/orcl') # 创建连接
cursor = con.cursor() # 创建游标
cursor.execute("select name from v$datafile;") # 执行sql语句
for i in cursor: # 打印数据
print(i)
cursor.close() # 关闭游标
con.close() # 关闭数据库连接
报错信息:
修改后运行效果图:
喜欢的点个赞❤吧!