Create a SELECT statement
To create a SELECT statement using SQL Assist:
- In the Outline view, click the main SQL Statement Properties
node.
- In the Details area, click SELECT. A SELECT statement
outline appears in the Outline view.
- Select tables for the SELECT statement (FROM
clause).
- 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.
- 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.
- Optional: Add conditions to the result
set (WHERE clause).
- Optional: Select grouping columns for the
result set (GROUP BY clause).
- Optional: Add conditions to the grouping
columns (HAVING clause).
- Optional: Order rows in the result set (ORDER
BY clause).
- Click OK. The SQL Assist window closes, and the generated SQL code is sent to the client application.
Related tasks