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的更多相关文章

  1. DML_DDL_触发器

    Oracle触发器1-介绍Oracle官方参考:PL/SQL Language Referenc->9 PL/SQL TriggerReasons to Use Trigger:■ Automa ...

  2. Oracle 触发器(一)

    1)触发器是一种特殊的存储过程,触发器一般由事件触发并且不能接受参数,存储器由语句块去调用:触发器是当某个事件发生时自动地隐式运行. 2)触发器分类: 1.DML触发器: 创建在表上,由DML事件引发 ...

  3. SpringBoot集成文件 - 如何基于POI-tl和word模板导出庞大的Word文件?

    前文我们介绍了通过Apache POI通过来导出word的例子:那如果是word模板方式,有没有开源库通过模板方式导出word呢?poi-tl是一个基于Apache POI的Word模板引擎,也是一个 ...

  4. forall 与 for loop 案例

    create table a_tab(ver number,id number);create table b_tab(ver number,id number);set timing on DECL ...

  5. 【跟着stackoverflow学Pandas】 -Get list from pandas DataFrame column headers - Pandas 获取列名

    最近做一个系列博客,跟着stackoverflow学Pandas. 以 pandas作为关键词,在stackoverflow中进行搜索,随后安照 votes 数目进行排序: https://stack ...

  6. 【跟着stackoverflow学Pandas】Select rows from a DataFrame based on values in a column -pandas 筛选

    最近做一个系列博客,跟着stackoverflow学Pandas. 以 pandas作为关键词,在stackoverflow中进行搜索,随后安照 votes 数目进行排序: https://stack ...

  7. 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 ...

  8. 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 ...

  9. sql for loop

    --step1 disable constraint begin for i in (select uc.constraint_name, uc.table_name from user_constr ...

随机推荐

  1. 判断url

    //判断url地址 isUrl(str){ let reg = /[0-9a-zA-z]+.(html|htm|shtml|jsp|asp|php|com|cn|net|com.cn|org)$/; ...

  2. 备份一下我的.bash_aliases文件

    # 这是陈悦老师的课程练习目录 alias cdchen="cd /home/branches/Documents/chen" # 每次grep都显示出行号 alias grep= ...

  3. spring security 学习二

    doc:https://docs.spring.io/spring-security/site/docs/ 基于表单的认证(个性化认证流程): 一.自定义登录页面 1.在securityConfigy ...

  4. WPF非UI线程访问网络资源造成页面假死现象

    公司内部一个项目是用WPF作为GUI 访问web接口的形式获取数据, 但是由于数据量比较大,也没做分页,于是就需要一个loading的控件,网上查了很多资料但都比较浅.这里完成需求后,总结一下. 首先 ...

  5. change transformation file in PI interface

    1. Jane extends the ZTMMASKU sap table 2. Jane write the program to write the new attribute to the t ...

  6. LeetCode Array Easy 53. Maximum Subarray 个人解法 和分治思想的学习

    Description Given an integer array nums, find the contiguous subarray (containing at least one numbe ...

  7. (转)Unity Cinemachine插件,实现单目标和多目标之间切换

    Unity Cinemachine插件学习笔记,实现单目标和多目标之间切换*版本要求Unity2017.1及以上. 参考资料: [官方] Unity 2017.1正式版发布 Cinemachine插件 ...

  8. 让Nginx路径中的子目录匹配文件夹的另一种写法

    其实相当于对路径做一种通配符,根据路径名访问相应的文件夹.直接看高潮部分如下.. location /static { root /var/www/usmt; index index.html boa ...

  9. C# Copy一个文件到另一个文件夹下

    public static void CopyToFile() { //源文件路径 string sourceName = @"D:\Source\Test.txt"; //目标路 ...

  10. 通信有连接有消息队列选择boost.asio

    通信有连接有消息队列选择boost.asio 连接自主管理 消息队列自主管理