Set Comparison



next up previous
Next: Testing for Empty Up: SQL Previous: Tuple Variables

Set Comparison

  1. To compare set elements in terms of inequalities, we can write

    or we can write

    to find branches whose assets are greater than some branch in Burnaby.

  2. We can use any of the equality or inequality operators with some. If we change > some to > all, we find branches whose assets are greater than all branches in Burnaby.

  3. To compare sets to see if one set contains another or not, we use the contains construct.

  4. The contains construct is computationally expensive, and does not appear in the ANSI standard.



Page created and maintained by Osmar R. Zaï ane
Last Update: Mon Oct 16 16:41:58 PDT 1995