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 ...
随机推荐
- >>> print "hello" SyntaxError: Missing parentheses in call to 'print'
错误原因说你的函数print缺省圆括号,可以知道你用的python是3.x版本3.x版本的python,print中的参数要用圆括号括起来,改成:print("hello")
- javascript 中的函数
/* 第二天 */ 函数 函数是js里最有趣的东西了,函数实际上就是对象,每个函数Function类型的实例,函数名实际上是指向函数对象的指针.不带圆括号的函数时访问函数的指针,带圆括号的是调 ...
- PAT 乙级练习题1002. 写出这个数 (20)
1002. 写出这个数 (20) 读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值.这里保证n小于10100. 输出格式 ...
- 实现一个EventEmitter类,这个类包含以下方法: on/ once/fire/off
实现一个EventEmitter类,这个类包含以下方法: on(监听事件,该事件可以被触发多次)- once(也是监听事件,但只能被触发一次)- fire(触发指定的事件)- off(移除指定事件的某 ...
- Bash: Removing leading zeroes from a variable
old=" # sed removes leading zeroes from stdin new=$(echo $old | sed 's/^0*//')
- 【Luogu】【关卡2-1】简单的模拟(2017年10月)
任务说明:开始普及组的训练!所谓模拟,就是直接根据题意编写,思维难度简单. 铺地毯 进制转换 多项式输出 机器翻译 排座椅 笨小猴 都是简单模拟题
- 获取请求url中的参数
一.根据request获取参数 假设请求地址是: http://127.0.0.1:8020/books/?title=语文 那么后台的路由配置: re_path('books/$', views.B ...
- 解决Addin开发不能断点调试的问题
ArcMap或CAD在调试C#二次开发的插件的时候,在一些情况下不能正常进入到断点中,原因是debugger type不对应. eg. 右键单击Solution Explorer,选择Add-> ...
- 数据结构(c语言版,严蔚敏)第1章绪论
第1章严蔚敏
- h5移动端局部放大效果
首先添加zoom.js (function (root, factory) { if (typeof exports === 'object' && typeof module === ...