请问在oracle下如何实现sql server的如下功能?
CREATE FUNCTION CheckGoodsNo (@GoodNo varchar(20))
RETURNS @Goods TABLE
(
tableid varchar(6),
tablename varchar(26)
)
AS
BEGIN
insert @Goods
select distinct 'a001 ' as AA, '客户商品价格档 ' as BB
FROM a
WHERE a002=@GoodNo
......
RETURN
END
------解决方案----------------------上面的有点错误
CREATE OR REPLACE PROCEDURE ll_02 (
p_GoodNo in varchar2(20),
p_cursor OUT sys_refcursor) IS
BEGIN
OPEN p_cursor FOR
select distinct 'a001 ' as AA, '客户商品价格档 ' as BB
FROM a
WHERE a002=p_GoodNo;
END ll_02;