Retrieving Data From Two or More Tables

In order to create a join, you need to have two or more tables visible in the Table Display Area.

To add more tables to create a join:

  1. From the Query Design window, click the Add Table button on the toolbar or the Add Table command from the Query menu.

    SQLWizard displays the Add Table dialog box.

  2. Click on the table you want to add.
    Note:

    Attempting to run a query involving tables from different locations will generate an error.

  3. Click the Add button to copy the table to the Table Display Area.
  4. Continue to add tables in this way until you have added all of the tables you want to join.
  5. When you are finished adding tables, click the Done button.
    Note:

    There is a limit of 15 tables in a FROM clause when running against XDB Server or DB2. Adding more than this number of tables will generate an error when you attempt to run the query.

    You can create nested SELECT statements that access many more tables than this limit. The limit applies to a single FROM clause.