• Oracle PLSQL Demo


    declare
    
        Type ref_cur_emp IS REF CURSOR RETURN scott.emp%RowType;
        cur_emp ref_cur_emp;
        rec_emp cur_emp%RowType;
    
        v_sql varchar2(100) := 'select * from scott.emp t';
    
    begin
    
        -- xxx Open cur_emp For v_sql;
        Open cur_emp For
            select * from scott.emp t;
        Loop
            fetch cur_emp
                InTo rec_emp;
            Exit When cur_emp%NotFound;
            dbms_output.put_line(cur_emp%rowcount || ' -> ' || rec_emp.empno ||
                                 '   ' || rec_emp.sal);
        End Loop;
        Close cur_emp;
    
    end;
  • 相关阅读:
    敌兵布阵
    Points on Cycle
    Hero
    E~最少拦截系统
    C
    A
    J
    H
    G
    A
  • 原文地址:https://www.cnblogs.com/nick-huang/p/4609100.html
Copyright © 2020-2023  润新知