标签:
CREATE OR REPLACE PACKAGE BODY temp_package_demo is FUNCTION f_demo(userid NUMBER) RETURN BOOLEAN IS v_temp varchar2(1); BEGIN SELECT 1 INTO v_temp FROM scott.emp WHERE empno = userid; RETURN TRUE; EXCEPTION WHEN NO_DATA_FOUND THEN RETURN FALSE; END; PROCEDURE p_demo_1(userid NUMBER DEFAULT v_demo, sal number) is v_temp varchar2(1); BEGIN SELECT 1 INTO v_temp FROM scott.emp WHERE empno = userid; EXCEPTION WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20011, ‘Not found‘); END; END temp_package_demo;
Oracle PLSQL Demo - 12.定义包体[Define PACKAGE BODY]
标签:
原文地址:http://www.cnblogs.com/nick-huang/p/4609085.html