Example

The following example returns a list of all customer companies located in California. Even though the state column, St, appears in the Query Conditions Grid, it does not appear in the result.

  1. Open a new query.
  2. Add the CUSTOMER table and click Done to close the Add Table dialog box.
  3. Click the COMPANY column in the Column Selection List to add it to the Query Conditions Grid.
  4. Click the ST column to add it to the grid.
  5. Move down to the Query Conditions Grid and enter the string CA in the Conditions row under the ST column name.
  6. Click the ST column to select it.
  7. Click the Hide Column button on the toolbar (or use the Hide Column command from the Column menu).
  8. Run the query. Only the COMPANY column is shown in the Result window, displaying the names of only those companies in California.
  9. Close the Result window.
  10. Examine the SQL code generated for this command by clicking on the SQL button on the toolbar. Notice that the ST column does not appear in the SELECT clause of the query, but it is mentioned in the WHERE clause.
  11. Click the Query Design button on the toolbar to switch back to Query Design mode. Save the query if you want to keep it, and close the Query Design window.