Specifying the tables for an SQL statement

Use the Tables page to specify the tables that your SQL statement will access. The table names that you select in the Tables page are displayed in the FROM clause of the SQL statement on the Review page.

The Available tables list displays the tables that you can use in your statement. These tables are stored in the database to which you are currently connected. By default, the tables listed are those whose schema is the user ID specified for the database connection. If no tables in the database have that schema, all the tables in the database are listed.

../rule.gif

To specify tables:

  1. In the Available tables list, click on the table or tables that you want to include in your statement. You can expand and collapse the list of tables at the schema level.

    If you are creating a SELECT statement, you can select multiple tables. If you are creating an INSERT, UPDATE, or DELETE statement, you can select one table.

  2. Click > to move the table or tables to the Selected tables list.

  3. Click on a table name in the Name field of the Selected tables list to type a correlation name for the table. When you type a correlation name, that name is used in your SQL statement. Specifying a correlation name does not change the name of the table in the database. You must use a correlation name if you select the same table more than once.

  4. If you are creating an INSERT, UPDATE, and DELETE statements, click <-> to exchange the table in the Selected table field with the selected table in the Available tables list.

  5. To remove a table from the Selected tables list, click on a table, then click <.

    To remove all of the tables from the Selected tables list, click <<.

If refresh capability is available, you can refresh the Available Tables list by clicking Refresh.

You can use the Filter schemas and Filter tables push buttons to limit the number of tables that are displayed in the Available tables list.

../rule.gif

Related information

Tables page - Fields and controls

Specifying result columns

Joining tables

Specifying search conditions for rows

Grouping rows and specifying search conditions for groups

Sorting the result set

Verifying the SQL statement

Inserting column values

Updating column values

Completing your SQL statement

Remapping data to another SQL data type

Creating SQL statements with SQL Assist

Logging on to SQL Assist

Selecting the type of SQL statement to create