Subqueries in Other Clauses

Subqueries in SELECT, WHERE, and HAVING Clauses

Subqueries in these clauses are highlighted like hyperlinks. You can add subqueries to these clauses by typing them instead of columns.

To open such a subquery for visual editing, click them holding the CTRL key. Subqueries in the SELECT statement may be renamed by entering name into the Alias column.

Subqueries in WHERE clause

Subqueries in GROUP BY and ORDER BY Clauses

Subqueries in these clauses should always return only one value (i.e. one row having one column). To add such a subquery, type it into the expression box and press ENTER. You can open them for visual editing only by navigating to them with Document Outline.

Subquery in SELECT statement

To add a subquery to a SELECT statement:

  1. In the query document, go to the Selection tab of the tabbed editor (it is placed under the diagram) and click the field in the Column field. The operand editor opens.

  2. Click the Create Subquery button. The program inserts a subquery template into the condition and automatically moves you to the subquery tab of the query document.

Subquery in WHERE and HAVING Clauses

To add a subquery to WHERE and HAVING clauses:

  1. In the query document, create a condition on the WHERE or HAVING tab of the tabbed editor and click the Create Subquery button in the Operand editor.

    Adding a subquery in WHERE clause

    The program inserts a subquery template into the condition and automatically moves you to the subquery tab of the query document.

    Subquery in WHERE clause

  2. Drag-and-drop a table to the subquery and add the subquery conditions. The subquery template will be populated with the added parameters.