Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]
时间:2015-06-29 23:54:48
收藏:0
阅读:250
create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETURN emp%RowType; cur_emp ref_cur_emp; rec_emp cur_emp%RowType; begin Open cur_emp For select * from emp t; Loop fetch cur_emp InTo rec_emp; Exit When cur_emp%NotFound; PIPE ROW(rec_emp); End Loop; Close cur_emp; end function_demo;
原文:http://www.cnblogs.com/nick-huang/p/4609114.html
评论(0)