Created
May 17, 2018 13:52
-
-
Save develost/e39455e2cf15275d400f8ab881a62e94 to your computer and use it in GitHub Desktop.
Oracle example of MEMBER OF function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create type typ_number_table IS TABLE OF NUMBER; | |
declare | |
ptyp_list typ_number_table; | |
begin | |
ptyp_list := typ_number_table(); | |
ptyp_list.extend; | |
ptyp_list(ptyp_list.last) := 88; | |
ptyp_list.extend; | |
ptyp_list(ptyp_list.last) := 90; | |
if (1 member of ptyp_list) then | |
DBMS_OUTPUT.put_line ('not ok'); | |
else | |
DBMS_OUTPUT.put_line ('ok'); | |
end if; | |
if (2 member of ptyp_list) then | |
DBMS_OUTPUT.put_line ('not ok'); | |
else | |
DBMS_OUTPUT.put_line ('ok'); | |
end if; | |
if (88 member of ptyp_list) then | |
DBMS_OUTPUT.put_line ('ok'); | |
else | |
DBMS_OUTPUT.put_line ('not ok'); | |
end if; | |
if (90 member of ptyp_list) then | |
DBMS_OUTPUT.put_line ('ok'); | |
else | |
DBMS_OUTPUT.put_line ('not ok'); | |
end if; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment