当前位置:网站首页> ORACLE中dbms_output.put_line输出问题的解决过程
ORACLE中dbms_output.put_line输出问题的解决过程
2022-06-28 15:01:00 【1024问】
前言
1. 开启oracle输出
2. 用sqlplus 登陆oracle
3. pl/sql执行输出语句
总结
前言最近写了oracle过程,有个ORACLE中dbms_output.put_line输出不了的问题。 花了近一个小时。下面描述一个这解决问题的历程(查资料与解决):
1. 开启oracle输出查了资料,说是oracle默认是关闭的。 要执行 :
set serveroutput on;才可以,于是在pl/sql develope中执行该语句,报错,原因: pl/sql不支持。
解决: 在windows cmd 中执行 sqlplus 命令。
2. 用sqlplus 登陆oracle1、开始在cmd 里执行: sqlplus /nolog
报错: 大意是 无此命令
大体原因: 没有安装oracle客户端,或者是环境变量出现了问题。
解决: 我的是重新安装了oralce客户端, 然后需要看下环境变量里边有没有这个变量,没有的话要手动加上,一般重新安装都是有的。
2、执行sqlplus/nolog
然后输入oracle链接信息 。我这里是链接远程的数据库
格式:sqlplus user/[email protected]_ip:port/实例名
示例:sqlplus xxgx/[email protected]:1521/orcl
登陆远程的原因,会有稍微停顿,连接上去以后。 可以执行 show user; 显示当前用户。
正确显示说明登陆成功。
附加: 查看当前用户下的所有表:
select TABLE_NAME from USER_TABLES;至此sqlplus成功登陆。
3. pl/sql执行输出语句执行:
--pl/sql编程语言--pl/sql编程语言是对sql语言的扩展,使得sql语言具有过程化变编程的特性。--pl/sql编程语言比一般的过程化编程语言,更加灵活高效。--pl/sql编程语言主要用来编写存储过程和存储函数等。--生命方法--赋值操作可以使用=: 也可以使用into查询语句赋值。declare i number(2) := 10 ; s varchar2(10) := '哈dd哈' ; ena XXGX_TJ_RBBTJ.SYS_TIME%type ; -- 引用型变量begin dbms_output.put_line(i); dbms_output.put_line(s); select SYS_TIME into ena from XXGX_TJ_RBBTJ where ID = 1000060; dbms_output.put_line(ena);end;显示:

这里要说的就是 这个输出啊,开始找半天没找到在哪输出,就在SQL旁边有个Output的窗口。点击即可看到。就这当时还懵圈了 哎。
总结到此这篇关于ORACLE中dbms_output.put_line输出问题解决的文章就介绍到这了,更多相关ORACLE dbms_output.put_line输出内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- 兼顾企业抗疫和发展的5个解决方案,来自IBM
- Leetcode(88)——合并两个有序数组
- 张同学还没学会当主播
- 2022 recurrent training question bank and online simulation examination for safety inspection of metal and nonmetal mines (underground mines)
- vscode编写markdown文件并生成pdf
- 验证回文串
- 美因基因港交所上市:市值43亿港元 IPO被市场忽略
- What is the renewal fee for PMP certificate?
- Spacetutorial (continuous updating...)
- 代码片段
猜你喜欢

快手投资电商服务商易心优选

币圈大地震:去年赚100万,今年亏500万

腾讯再遭大股东Prosus减持:后者还从京东套现37亿美元

坐拥1200亿,她又要IPO敲钟了

安杰思医学冲刺科创板:年营收3亿 拟募资7.7亿
![[C language] how to generate normal or Gaussian random numbers](/img/31/964e0922e698a3746599b840501cdf.png)
[C language] how to generate normal or Gaussian random numbers

Youju new material rushes to Shenzhen Stock Exchange: it plans to raise 650million yuan, with an annual revenue of 333million yuan

物联网低代码平台常用《组件介绍》

Ionq and Ge research confirmed that quantum computing has great potential in risk aggregation

3. Caller 服务调用 - dapr
随机推荐
新零售线下店逆势起飞,通膨乌云下的消费热情
PMP真的有用吗?
物联网低代码平台常用《组件介绍》
Recommended practice sharing of Zhilian recruitment based on Nebula graph
Softing epGate PB系列网关-可将PROFIBUS总线集成到EtherNet/IP网络
【数字IC精品文章收录】近500篇文章|学习路线|基础知识|接口|总线|脚本语言|芯片求职|安全|EDA|工具|低功耗设计|Verilog|低功耗|STA|设计|验证|FPGA|架构|AMBA|书籍|
dolphinscheduler2. Installation of X (valid for personal test)
Flutter series: offstage in flutter
Send2vec tutorial
【mysql学习笔记23】索引优化
Seata数据库中出现以下问题要怎么解决呀?
JS judge whether the string is empty or not
Leetcode (167) -- sum of two numbers II - input ordered array
QQ被盗号后群发黄图,大批用户“社死”
Leetcode 48. Rotate image (yes, resolved)
Jackie Chan and fast brand, who is the Savior of Kwai?
Quantum frontier hero spectrum - "light quantum Explorer" McMahon: turning any physical system into a neural network
动力电池,是这样被“瓜分”的
Mingchuangyou products passed the listing hearing: seeking dual main listing with an annual revenue of 9.1 billion
Combined sum leetcode