postgresql 匿名函数(单独执行代码段)
时间:2021-07-01 10:21:17
帮助过:6人阅读
declare
top integer;
row_org dbo.a_org_type%rowtype;
begin
/* Insert real code here */
select into row_org
* from dbo.a_org_type
order by id
desc limit
1;
top :
= row_org.id
+ 1;
for idx
in 1..
5 loop
insert into dbo.a_org_type(id, des)
values(
top,
‘shang hai ‘ || top);
top :
= top + 1;
end loop;
end;
$$
postgresql 匿名函数(单独执行代码段)
标签:row HERE nbsp postgres gre 代码 desc sel int