oracle创建function返回cursor游标
CREATE OR REPLACE FUNCTION A_Test()RETURN SYS_REFCURSOR is type_cur SYS_REFCURSOR; BEGIN OPEN type_cur FOR select * from user; RETURN type_cur; END;
SYS_REFCURSOR:游标类型(相当于返回一个表的数据)
CREATE OR REPLACE FUNCTION A_Test()RETURN SYS_REFCURSOR is type_cur SYS_REFCURSOR; BEGIN OPEN type_cur FOR select * from user; RETURN type_cur; END;
SYS_REFCURSOR:游标类型(相当于返回一个表的数据)