MEMBER OF table collection : MEMBER OF « Collections « Oracle PL/SQL Tutorial






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

Procedure created.








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