• Oracle 通用存储过程


    CREATE OR REPLACE PROCEDURE P_Pub_GetList
    (
        StrWhere varchar2,  ---查询条件(不带where关键字的查询条件)
        TableName varchar2,  ---表名称
        Field varchar2,  ---字段名称
        curArg out sys_refcursor  --返回记录集
    )
    IS
      v_sql long := '';      --sql语句
    begin
        if StrWhere = '!@#$%^&*()全部' then--获取所有
             v_sql := 'select '|| Field ||' from ' || TableName;
        else   --获取符合条件的
            if StrWhere is not null then
                v_sql := 'select '|| Field ||' from ' || TableName || ' where ' || StrWhere;
            else
                v_sql := 'select '|| Field ||' from ' || TableName;
            end if;
        end if;
    
        --DBMS_OUTPUT.put_line(v_sql);
        OPEN curArg FOR v_sql;
    end P_Pub_GetList;
  • 相关阅读:
    git stash
    vim 使用
    git 分支管理
    git 日常使用
    js createElement
    git checkout
    2.2链表 链表中倒数第k个结点
    1.8字符串及分析 翻转子串
    全排列
    1.7数组 清除行列
  • 原文地址:https://www.cnblogs.com/rwh871212/p/4907086.html
Copyright © 2020-2023  润新知