Oracle-函数

CREATE OR REPLACE FUNCTION GET_WS_DIC_VALUE(dcode IN VARCHAR2) 
RETURN  VARCHAR2 as
dname VARCHAR2(200);
BEGIN
SELECT NAME INTO dname from PSN_WS_DIC_RELATED_RANGE WHERE code = dcode;
RETURN  dname;
EXCEPTION
WHEN no_data_found THEN
RETURN  '';
END GET_WS_DIC_VALUE;

 

posted @ 2016-06-29 10:20  伍叶春  阅读(121)  评论(0编辑  收藏  举报