Predicates & Joins



next up previous
Next: Set Membership Up: SQL Previous: Set Operations

Predicates & Joins

  1. SQL does not have a natural join equivalent. However, natural join can be expressed in terms of a Cartesian product, selection and projection.

  2. For the relational algebra expression

    we can write in SQL

  3. The predicates can be more complicated, and can involve
  4. Some examples:
    1. Find name and city of all customers having a loan at the SFU branch.

    2. Find account number of accounts with balances between $90,000 and $100,000.

    3. Find all customers whose street includes the substring ``Main''.



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