Create a SELECT statement

To create a SELECT statement using SQL Assist:

  1. In the Outline view, click the main SQL Statement Properties node.
  2. In the Details area, click SELECT. A SELECT statement outline appears in the Outline view.
  3. Select tables for the SELECT statement (FROM clause).
  4. Optional: Join tables in the SELECT statement.

    Joining tables in multi-table queries ensures that SQL Assist does not generate an undesirable Cartesian product. You must select more than one table before you can join tables.

  5. Optional: Select columns for the result set (SELECT clause).

    If you do not select individual result set columns for the SELECT statement, all columns are returned by default.

  6. Optional: Add conditions to the result set (WHERE clause).
  7. Optional: Select grouping columns for the result set (GROUP BY clause).
  8. Optional: Add conditions to the grouping columns (HAVING clause).
  9. Optional: Order rows in the result set (ORDER BY clause).
  10. Click OK. The SQL Assist window closes, and the generated SQL code is sent to the client application.

Related tasks