MEMBER OF Operator : MEMBER OF « Collections « Oracle PL/SQL Tutorial






MEMBER OF operator checks whether an element is in a nested table.

SQL> CREATE OR REPLACE PROCEDURE member_of_example AS
  2    TYPE nestedTableType IS TABLE OF VARCHAR2(10);
  3    myTable1 nestedTableType;
  4    result BOOLEAN;
  5  BEGIN
  6    myTable1 := nestedTableType('F', 'G', 'S');
  7    result := 'George' MEMBER OF myTable1;
  8    IF result THEN
  9      DBMS_OUTPUT.PUT_LINE('''George'' is a member');
 10    END IF;
 11  END member_of_example;
 12  /

Procedure created.

SQL> CALL member_of_example();

Call completed.

SQL>
SQL>








26.21.MEMBER OF
26.21.1.MEMBER OF Operator
26.21.2.MEMBER OF is a logical comparison operator
26.21.3.MEMBER OF operator finds if the left operand is a member of the collection used as the right operand
26.21.4.MEMBER OF table collection