定义变量,调用存储过程,使用定义的变量作为传出参数
declare
v_flag integer := 0;
v_error integer := 0;
begin
stat_bboss_recreport_csmp(201803, v_flag, v_error);
end;
打印函数
dbms_output.put_line(v_error);
添加索引
CREATE INDEX idx_order_id ON 表明(字段名);
添加字段注释
COMMENT ON COLUMN 表名.字段名 IS '任务单编码';
添加表注释
COMMENT ON table 表名 IS '调账申请明细信息表';
行转列
SELECT xxx,
xmlagg(xmlparse(content 字段名||',' wellformed) order by 字段名).getclobval(),
LISTAGG(to_char(字段名), ',') WITHIN GROUP(ORDER BY 字段名)
FROM (select字段
from 表
where 条件)
group by xxx
xmlagg 是clob,listagg是varchar2