Use this tab to restrict the columns that appear in your result set. You can specify columns, column aliases, computed columns, or subqueries. You specify subqueries using the Expression Editor.
Available columns – This box lists all the tables you have chosen for your query, and the columns in each table.
Selected columns – By default, all columns are selected for your query. To delete a column, select it in the Selected Columns box and click the left arrow. To display a column in your result set, select a column or set of columns in the Available Columns box and click the right arrow. Use the up and down arrows to scroll through the columns in the Selected Columns box.
If you select the same column more than once, an alias is applied. You can edit the alias name.
DISTINCT – Select DISTINCT if you want to eliminate duplicate rows from your result set.
Many statements take significantly longer to execute when DISTINCT is specified, so you should reserve DISTINCT for cases where it is necessary. In addition, DISTINCT treats nulls as duplicates, so when you select DISTINCT, only one null is returned in the results.
Limit rows – You can choose to retrieve only the first row of the result set, or only the number of rows that you specify. No matter what you choose, the maximum number of rows that appear in the Query Editor is 25.
Results Click – Results at the bottom of the dialog to see the results of your query, or an error message if the query contains errors.
SQL – Click SQL at the bottom of the dialog to see the SQL code for your query.
To add a subquery in the Query Editor, click the Add a Computed Column button, which is located between the lists of columns. The Expression Editor appears. In the Expression Editor, click the Subquery button, which is located beside the Not button.
For more information, see Introducing the Query Editor.