(Oracle doesn't have CONTAINS keyword XDw prolly it's a trap for Java programmers - in which most collection objects have contains(Object) method @A@)
PROCEDURE x_mink
IS
TYPE integer_table IS TABLE OF NUMBER;
l_numbers integer_table := integer_table (1,2,3,4,5,6,7,8,9,0);
l_lucky_numbers integer_table := integer_table(3,7,9);
l_unlucky_numbers integer_table := integer_table(15,20);
BEGIN
-- SUBMULTISET test
IF l_lucky_numbers SUBMULTISET OF l_numbers THEN
DBMS_OUTPUT.PUT_LINE('l_lucky_numbers is SUBMULTISET of l_numbers');
ELSE
DBMS_OUTPUT.PUT_LINE('l_lucky_numbers is NOT SUBMULTISET of l_numbers');
END IF;
IF l_unlucky_numbers SUBMULTISET OF l_numbers THEN
DBMS_OUTPUT.PUT_LINE('l_unlucky_numbers is SUBMULTISET of l_numbers');
ELSE
DBMS_OUTPUT.PUT_LINE('l_unlucky_numbers is NOT SUBMULTISET of l_numbers');
END IF;
NULL;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END x_mink;
result
***Update Dec. 15 PLSQL challenge
Your Results
| Player Statistics
| Your Ranking
|
No comments:
Post a Comment