Constraints Inherited by Subprograms
DECLARE
SUBTYPE v_word IS VARCHAR2(10) NOT NULL;
verb V_WORD := 'run';
noun VARCHAR2(10) := NULL;
PROCEDURE Word_to_upper
(w IN V_WORD)
IS
BEGIN
dbms_output.Put_line(Upper(w));
END word_to_upper;
BEGIN
Word_to_upper('run_over_ten_characters'); -- size constraint is not enforced
-- word_to_upper(noun); invalid, NOT NULL constraint is enforced
END;
/
0 comments:
Post a Comment