当前位置:网站首页>plsql变量赋值问题
plsql变量赋值问题
2022-06-22 17:05:00 【CSDN问答】
向一个变量传入 10001,10002 这种样式用于查询,但目前这样写会报错,请指教!
--数据准备
create table wareinfo(WareID number(5),WareName varchar(50));
insert into wareinfo values(10001,'A商品');
insert into wareinfo values(10002,'B商品');
select * from wareinfo;
--查询语句
declare var_WareID varchar2(100) ;
var_WareName varchar2(100);
var_WareCursor sys_refcursor;
begin
var_WareID:='10001,10002';
open var_WareCursor for
--select wareinfo.WareName from wareinfo where WareID in (10001,10002) ;
select wareinfo.WareName from wareinfo where WareID in (var_WareID) ; --通过变量得到和上一句等价语句,但目前这样写会报错,请指教!
fetch var_WareCursor into var_WareName;
while var_WareCursor%found loop--遍历游标
dbms_output.put_line(var_WareName);
fetch var_WareCursor into var_WareName;
end loop;
end;
边栏推荐
- TypeScript(7)泛型
- 炒股开户选择哪个券商公司是最安全最好呢
- docker: Error response from daemon: Conflict. The container name “/mysql“ is already in use by conta
- Content recommendation process
- 云端极简部署Svelte3聊天室
- 不断重修的计划与变化
- [face recognition] matlab simulation of face recognition based on googlenet deep learning network
- 项目经理们在哪个时刻特别想逃离工作?
- Unity中通过射线躲避障碍物寻路的一些初步探索
- Jenkins配置项目集成钉钉通知
猜你喜欢

中国移动手机用户缓慢增长,但努力争取高利润的5G套餐用户

Binary tree practice the second bullet

游戏NFT市场:OpenSea最易被切下的蛋糕

JSP learning (I) -- overview of JSP

How to do well in R & D efficiency measurement and index selection

Grafana 9 is officially released, which is easier to use and more cool!

测试组的任务职责和测试的基本概念
![[small program project development -- Jingdong Mall] rotation chart of uni app development](/img/9b/503919129a2c544dd6143c6b47a2c4.png)
[small program project development -- Jingdong Mall] rotation chart of uni app development
![[applet project development -- Jingdong Mall] subcontracting configuration of uni app development](/img/12/53f00e730426880b9a9d0407bb5863.png)
[applet project development -- Jingdong Mall] subcontracting configuration of uni app development

docker: Error response from daemon: Conflict. The container name “/mysql“ is already in use by conta
随机推荐
【工具】pip和conda的相關使用
The world's first AR contact lens, the entrance of metauniverse is really opened this time?
让RDS(for MySQL)数据库的慢日志、审计日志跨空间转存OBS变得更加自动化
数据库行业分析:从全球IT产业趋势到国产数据库发展之路
Behind the fall of the first Seberg: the extreme race between technology and frostbite
Development mode of JSP learning
How does flynk MySQL CDC guarantee the server_ Is the ID globally unique?
怎么才能自动预约打新债?预约打新债方便安全吗
啊哈C语言 第6章 天啊 一大串数正在接近(第26讲)
Typescript (7) generic
In May, 2022, China's game manufacturers and applications went to sea, with top 30 revenue in EMEA region
诺亚财富拟登陆港交所:第一季度业绩大幅下滑,曾踩雷“承兴案”
Ad20/altium Designer - oil for manhole cover
I became a big enemy when I bought wanghong ice cream
Stop automatically after MySQL server starts
静态链表(一)
请问一下flink mysql-cdc 如何保证server_id全局唯一呢?
Pytorch——报错解决:“torch/optim/adamw.py” beta1, UnboundLocalError: local variable ‘beta1‘
Concepts and solutions of redis' cache penetration, cache avalanche and cache breakdown problems
请问一下,CDC2.0在读取mysql的时候,应该是没有表锁了吧,刚刚报了一个错误,access d