SQL>
SQL> CREATE OR REPLACE PROCEDURE equal_example AS
2 TYPE nestedTableType IS TABLE OF VARCHAR2(10);
3 myTable1 nestedTableType;
4 myTable2 nestedTableType;
5 myTable3 nestedTableType;
6 result BOOLEAN;
7 BEGIN
8 myTable1 := nestedTableType('A', 'F', 'G');
9 myTable2 := nestedTableType('B', 'E', 'H');
10 myTable3 := nestedTableType('C', 'D', 'I');
11
12 result := myTable1 = myTable2;
13 IF result THEN
14 DBMS_OUTPUT.PUT_LINE('myTable1 equal to myTable2' );
15 END IF;
16
17 result := myTable1 <> myTable3;
18 IF result THEN
19 DBMS_OUTPUT.PUT_LINE('myTable1 not equal to myTable3');
20 END IF;
21 END equal_example;
22 /
Procedure created.
SQL>
SQL> CALL equal_example();
myTable1 not equal to myTable3
Call completed.
SQL>
|