loop find column
declare
l_sql varchar2(500); -- variable that contains a query
l_c sys_refcursor; -- cursor variable(weak cursor).
l_res1 VARCHAR2(60 BYTE); -- variable containing fetching data
l_res2 VARCHAR2(60 BYTE); -- variable containing fetching data
l_res3 date; -- variable containing fetching data
begin
l_sql := 'SELECT column_name, table_name FROM USER_TAB_COLUMNS';
open l_c for l_sql;
loop
fetch l_c into l_res1,l_res2;
exit when l_c%notfound; -- Exit the loop if there is nothing to fetch.
if l_res1 = 'ACCT_NUM' then
dbms_output.put_line(l_res2);
end if; -- process fetched data
end loop;
close l_c; -- close the cursor
end;
/
commit;
loop find column的更多相关文章
- DML_DDL_触发器
Oracle触发器1-介绍Oracle官方参考:PL/SQL Language Referenc->9 PL/SQL TriggerReasons to Use Trigger:■ Automa ...
- Oracle 触发器(一)
1)触发器是一种特殊的存储过程,触发器一般由事件触发并且不能接受参数,存储器由语句块去调用:触发器是当某个事件发生时自动地隐式运行. 2)触发器分类: 1.DML触发器: 创建在表上,由DML事件引发 ...
- SpringBoot集成文件 - 如何基于POI-tl和word模板导出庞大的Word文件?
前文我们介绍了通过Apache POI通过来导出word的例子:那如果是word模板方式,有没有开源库通过模板方式导出word呢?poi-tl是一个基于Apache POI的Word模板引擎,也是一个 ...
- forall 与 for loop 案例
create table a_tab(ver number,id number);create table b_tab(ver number,id number);set timing on DECL ...
- 【跟着stackoverflow学Pandas】 -Get list from pandas DataFrame column headers - Pandas 获取列名
最近做一个系列博客,跟着stackoverflow学Pandas. 以 pandas作为关键词,在stackoverflow中进行搜索,随后安照 votes 数目进行排序: https://stack ...
- 【跟着stackoverflow学Pandas】Select rows from a DataFrame based on values in a column -pandas 筛选
最近做一个系列博客,跟着stackoverflow学Pandas. 以 pandas作为关键词,在stackoverflow中进行搜索,随后安照 votes 数目进行排序: https://stack ...
- average column data from multiple files
example in file a, data is [1 , 2, 3; 4,5,6] file b, data is [4,5, 6; 7,8,9] average=0.5 (a+b) matl ...
- SQL Server loop - how do I loop through a set of records
SQL Server loop - how do I loop through a set of records By using T-SQL and cursors like this : DECL ...
- sql for loop
--step1 disable constraint begin for i in (select uc.constraint_name, uc.table_name from user_constr ...
随机推荐
- Caused by: java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings, locale zh_CN
这个是很早以前的一个bug了,最近开始用idea发现追源码相当方便,于是结合网上的解决方案以及自己的判断追踪一下原因,当然没有深究,只是根据提示一直追而已:先说一下解决方案: <dependen ...
- tex, virtex, initex - 文本格式化和排版
SYNOPSIS 总览 tex [options] [commands] DESCRIPTION 描述 这份手册页并不全面.此版本的 TeX 完整的文档可以从 info 文件或者手册 Web2C: A ...
- RK3288 android切换耳麦通道
通过耳机状态切换耳机mic与板子麦/work/rk3288/firefly-rk3288_android5.1_git_20180126/kernel/sound/soc/codecs/es8323. ...
- dubbo-源码阅读之容器启动
dubbo Main 例子 public class Start { public static void main(String[] args) throws Exception { com.ali ...
- 头文件 <sys/un.h>
struct sockaddr_un server_sockaddr ; struct sockaddr_un cli_sockaddr ;
- 【CSS】input 框的一些事情
1.input框光标太长与不居中的问题 如果input框height:40px 为了字体垂直居中line-height也设为40px 问题来了,这样光标在刚刚focus时候是占据整个input框并且输 ...
- 【转载】网易极客战记官方攻略-地牢-严酷考验 B
关卡连接:https://codecombat.163.com/play/level/the-gauntlet-b 免费试玩:https://codecombat.163.com/play 使用你的所 ...
- SqlServer 将表里面的值赋给变量
@@c_beiz varchar(500) select top 1 @c_beiz = c_beiz from g_billd_qh_tmp where u_id=''+@uid+'' and io ...
- mac MAMP安装redis扩展
一般情况下目录大概是一样的,只是php的版本不同,所以选择好自己对应的php版本目录即可 git clone https://github.com/nicolasff/phpredis.git cd ...
- springcloud feign增加熔断器Hystrix
1.依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>s ...