相关疑难解决方法(0)

PostgreSQL相当于Oracle"批量收集"

在PostgreSQL中存在一些使用批量收集的声明的方法,就像在Oracle中一样?

Oracle中的示例:

create or replace procedure prc_tst_bulk_test is

type typ_person is table of tb_person%rowtype;
v_tb_person typ_person;

begin

select *
bulk collect into v_tb_person
from tb_person;

-- make a selection in v_tb_person, for instance    
select name, count(*) from v_tb_person where age > 50
union 
select name, count(*) from v_tb_person where gender = 1

end;
Run Code Online (Sandbox Code Playgroud)

谢谢

postgresql plpgsql

0
推荐指数
2
解决办法
9177
查看次数

标签 统计

plpgsql ×1

postgresql ×1