CodePudding user response:
Yang Ge, I know it's you, where to go? ~!CodePudding user response:
CREATE OR REPLACE PROCEDURE SP_NL (in_xh IN an XSB, XH % TYPE)
AS
I_NL an XSB. NL % TYPE;
V_SQLSTMT VARCHAR2 (300);
The BEGIN
='SELECT V_SQLSTMT: NL FROM EMP WHERE XH=: IN_XH';
The EXECUTE IMMEDIATE V_SQLSTMT
INTO I_NL
USING in_xh;
IF I_NL & gt; 18 THEN
DBMS_OUTPUT. PUT_LINE (' adult ');
The ELSE
DBMS_OUTPUT. PUT_LINE (' minor ');
END;
- the call
DECLARE
The BEGIN
SP_NL (& amp; Xh);
END;