To interactively create SQL syntax for a SELECT statement, select the Create push button in the Multi-row Query Settings window.
The SELECT Details window is displayed. The tables and views of the
database defined in the connection specification are listed for you in the
Tables/views list.
![]() | You can limit the number of tables that appear in this list by setting high-level qualifiers. You can set high level qualifiers globally in the VisualAge Preferences notebook, or for a single query in the query part's settings. See Using high-level qualifiers for more information. |
Define a SELECT statement as follows:
A query requires a name that is unique within a particular access set. It cannot contain double-byte characters or spaces. For the sample application, type StaffQuery.
The description is optional. For the sample application, type Selects all columns in the STAFF table.
You are now ready to define a SELECT statement by working with the tables and columns of your database.
![]() | Any time you want to see the text of the SQL statement, select the Show SQL push button. A window appears that displays the text of your SQL statement as it is being defined. |
Your query is saved in the access set and you are returned to the Multi-row
Query Settings window. The name and description of your query are
displayed in the Query name drop-down list and
Description field, respectively.
You have now defined a query that selects all of the rows from a table in a database. The next task is to return to the Multi-row Query Settings window to set fetch and update policies.