当前位置:网站首页>pl/sql 创建并执行oralce存储过程,并返回结果集
pl/sql 创建并执行oralce存储过程,并返回结果集
2022-07-25 14:58:00 【Kimizhou_blog】
因为以前一直用sql server多,现在一下子用oracle ,工具什么都不熟,局限于sql server的思想
网上搜,和问朋友,跟我讲了一大堆,什么loop 啊,decalre啊,package啊,什么命令窗口啊,什么 sql plus啊,什么不支持pl/sql啊.耽误了好几个小时..完全都是在误导人,其实什么都不需要。
只需要定义一个结果集,把东西存到结果集中就结束(这个结果集叫做游标),先创建存储过程:
create or replace procedure Demo(data out sys_refcursor) is
begin
open data for select * from gsminfo;
end Demo;然后直接执行就OK ,执行的方法如下:
找到存储过程,右键,选择测试:

然后出现的页面,再选择点击运行:

然后直接看结果集就可以了,注意了,oracle pl/sql这个工具,存储过程的结果集做的很不人性化,比起sql server差了很多,结果集在一个很隐蔽的地方,如图所示,点开即可


边栏推荐
- [MySQL must know and know] trigger | permission management
- 45padding不会撑开盒子的情况
- Quickly set up dobbo demo
- D2. Chopping Carrots (Hard Version) (每日一题)
- C language and SQL Server database technology
- 006操作符简介
- The solution to the problem that the progress bar of ros2 installation connext RMW is stuck at 13%
- [C题目]力扣88. 合并两个有序数组
- Dpkg package download addresses of various platforms (including arm64)
- Heyuan City launched fire safety themed milk tea to boost fire prevention and control in summer
猜你喜欢

"Ask every day" briefly talk about JMM / talk about your understanding of JMM

06. Neural network like

45padding不会撑开盒子的情况
![[eloquence] negotiation persuasion skills and Strategies](/img/01/0fcbbfcf35a6d166c14ba4215eacac.jpg)
[eloquence] negotiation persuasion skills and Strategies

Gameframework making games (II) making UI interface

Go language founder leaves Google

Niuke multi school E G J L

The solution to the problem that the progress bar of ros2 installation connext RMW is stuck at 13%

Resource not found: rgbd_ Launch solution

L1 and L2 regularization
随机推荐
Live classroom system 05 background management system
006操作符简介
Content type corresponding to office file
(original) customize a scrolling recyclerview
没错,请求DNS服务器还可以使用UDP协议
[C题目]牛客 链表中倒数第k个结点
Application practice: Great integrator of the paddy classification model [paddlehub, finetune, prompt]
冈萨雷斯 数字图像处理 第一章绪论
Deng Qinglin, a technical expert of Alibaba cloud: Best Practices for disaster recovery and remote multi activity across availability zones on cloud
D2. Chopping Carrots (Hard Version) (每日一题)
[C topic] Li Kou 206. reverse the linked list
【MySQL系列】-索引知多少
Awk from getting started to digging in (20) awk parsing command line parameters
"Ask every day" what is volatile
关于ROS2安装connext RMW的进度条卡在13%问题的解决办法
MySQL 45 talks about | 06 global locks and table locks: Why are there so many obstacles to adding a field to a table?
Ssh server rejected password
Kibana operation es
The input input box of H5 page pops up the numeric keypad, which needs to support decimal points
Add the jar package under lib directory to the project in idea