title: How to compare complex collections in Oracle?
body: <p>Let us say I have two table types (tables of object types) that I want to compare for equality...</p>
  
  <p>The object types have multiple fields, say, an <code>integer</code>, <code>varchar2</code>, and <code>date</code>.</p>
  
  <p>I have seen examples where people use <code>MULTISET EXCEPT</code> in order to effectively do a <code>MINUS</code> on two tables of <code>INTEGER</code>.</p>
  
  <p>But this does not work with two tables of complex object types.</p>
  
  <p>Also I have seen mentioned the use of <code>MAP MEMBER FUNCTION</code> in order to make complex collections work when using the <code>SET</code> operator, but no mention of <code>MULTISET</code> functionality.</p>
  
  <p>The current way I am comparing for equality is to take table type 1 (TT1) and table type 2 (TT2) and say they are equal if <code>TT1 MINUS TT2 = 0 AND TT2 MINUS TT1 = 0</code>. But here I am just selecting the PK from both tables for the MINUS, I would also like to be able to compare more than one field.</p>
  
  <p>I am hoping <code>MULTISET</code> is faster?</p>
  
  <p>Thanks.</p>