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






MEMBER OF table collection

 

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.

   
  








Related examples in the same category

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