PostgreSQL游标函数的唯一ID

时间:2018-12-17 05:27:43

标签: postgresql

我试图按如下所示在笛卡尔积/联接上创建一个游标,它给出了一个错误

create or replace function som1() returns integer as $$
declare
rCur cursor for  (select*  from t1);
 er route%rowtype;

begin
for er in
 select  route_id, location, happy from t1, t2 where exams.pid = route.pid 
 loop
 end loop;
return 4;
end;
$$ language plpgsql;
select som1();

0 个答案:

没有答案