IS A SET, table collection : IS « PL SQL « Oracle PL / SQL






IS A SET, table collection

 


SQL> CREATE OR REPLACE PROCEDURE is_a_set_example AS
  2    TYPE charTable IS TABLE OF VARCHAR2(10);
  3    emp1 charTable;
  4    result BOOLEAN;
  5  BEGIN
  6    emp1 := charTable('A', 'B', 'C', 'D');
  7    result := emp1 IS A SET;
  8    IF result THEN
  9      DBMS_OUTPUT.PUT_LINE('Elements are all unique');
 10    ELSE
 11      DBMS_OUTPUT.PUT_LINE('Elements contain duplicates');
 12    END IF;
 13  END is_a_set_example;
 14  /

Procedure created.

   
  








Related examples in the same category

1.IS A SET operator checks whether a variable is a VARRAY or NESTED TABLE collection variable
2.IS EMPTY
3.IS EMPTY operator checks whether a VARRAY or NESTED TABLE collection variable is empty
4.IS NULL operator checks whether a variable value is null
5.If varray is empty