pgsql存储过程(实例)
来源:互联网 发布:java 路径 编辑:程序博客网 时间:2024/06/08 09:06
pg存储过程 简单示例:
create or replace function select_resource_produrce(IN mprCode text , IN publicationType text , OUT resourceName text ,OUT resourceId int8)returns record as$BODY$ BEGINif publicationType = '1' then select book_name_cn , book_id into resourceName,resourceId from t_book where mpr_code = mprCode; end if;if publicationType = '2' then select periodical_name_cn , periodical_id into resourceName,resourceId from t_periodical where mpr_code = mprCode; end if;if publicationType = '3' then select newspaper_name_cn , newspaper_id into resourceName,resourceId from t_newspaper where mpr_code = mprCode; end if;if publicationType = '4' then select audio_name_cn , audio_id into resourceName,resourceId from t_audio where mpr_code = mprCode; end if;END;$BODY$language plpgsql;SELECT * from select_resource_produrce('0000000226' , '1')
调用 :SELECT * from select_resource_produrce('0000000226' , '1')
0 0
- pgsql存储过程(实例)
- PGSQL 迁移存储过程经验
- postgre 存储过程简单实用方法 (过程语言: PL/pgSQL)
- postgre 存储过程简单实用方法 (过程语言: PL/pgSQL)
- postgre存储过程简单实用方法 (过程语言: PL/pgSQL)
- postgre存储过程简单实用方法 (过程语言: PL/pgSQL)
- 用PL/pgSQL写postgreSQL的存储过程
- 用PL/pgSQL写postgreSQL的存储过程
- 用PL/pgSQL写postgreSQL的存储过程
- PostgreSQL每日一贴--PL/pgSQL存储过程示例
- pgsql(解决问题过程中的资料收集)
- pgSQL 集群过程
- mysql 存储过程游标(Cursor)实例
- MySql存储过程实例解析(一)
- 存储过程语法及实例(转)
- JAVA调用存储过程实例(1)
- SQLSERVER存储过程实例(下)
- SQLSERVER存储过程实例(上)
- STL之list姿势
- hd 2077 汉诺塔IV
- tomcat shutdown connection refused
- Linux 网络编程之UDP
- 【源码】Vector、Stack源码解析
- pgsql存储过程(实例)
- poj3252 round number
- Red Hat 6.3安装gcc gc++
- ASP.NET后台调用前台JS函数的三种常见方法
- FS_S5PC100平台上Android Camera架构分析
- NSURLRequest,NSURLConnection 下载
- ural 1772
- Intent 跳 Android Market
- ServletRequest使用方法