MEMBER OF is a logical comparison operator : MEMBER OF « PL SQL « Oracle PL / SQL






MEMBER OF is a logical comparison operator

 

SQL>
SQL>  DECLARE
  2     TYPE list IS TABLE OF NUMBER;
  3     n VARCHAR2(10) := 'One';
  4     a LIST := list('One', 'Two', 'Three');
  5   BEGIN
  6    IF n MEMBER OF a THEN
  7     dbms_output.put_line('"n" is member.');
  8    END IF;
  9   END;
 10   /
 DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 4

   
  








Related examples in the same category

1.MEMBER OF operator finds if the left operand is a member of the collection used as the right operand
2.MEMBER OF table collection