更新时间:2023-10-23 GMT+08:00
调用语句
示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
--创建存储过程proc_staffs openGauss=# CREATE OR REPLACE PROCEDURE proc_staffs ( section NUMBER(6), salary_sum out NUMBER(8,2), staffs_count out INTEGER ) IS BEGIN SELECT sum(salary), count(*) INTO salary_sum, staffs_count FROM hr.staffs where section_id = section; END; / --调用存储过程proc_return. openGauss=# CALL proc_staffs(2,8,6); --清除存储过程 openGauss=# DROP PROCEDURE proc_staffs; |
父主题: 基本语句