get diagnostics cnt := row_count;
现在有两个表tab1和tab2,两个表的格式相同,tab1中有1000条数据,tab2中0条数据
创建测试功能函数
create or replace function test_fun()
return integer as
$body$
declare
rowcnt integer;
begin
insert into tab2 select * from tab1;
get diagnostics rowcnt := row_count;
return rowcnt;
end;
$body$
LANGUAGE plpgsql VOLATILE;
ALTER FUNCTION test_fun()
OWNER TO gpadmin;
执行
select test_fun()
返回结果1000
继续阅读与本文标签相同的文章
上一篇 :
VMware的远程管理代理允许远程执行
下一篇 :
Facebook可能会禁止误导用户的业务
-
学生时代所学的一些 C 语言知识点回顾(3)——再议指针的声明与使用
2026-05-18栏目: 教程
-
语音顶会Interspeech 论文解读|Audio Tagging with Compact Feedforward Sequential Memory Network and Audio-to-Audio Ratio Based Data Augmentation
2026-05-18栏目: 教程
-
SIA-GateWay之API网关安装部署指南
2026-05-18栏目: 教程
-
MySQL灵魂100问,你能答出多少?
2026-05-18栏目: 教程
-
如何入门 MySQL
2026-05-18栏目: 教程
