Query Tab, Properties Window (Query Designer)
Contains options for controlling the behavior of the query you are building or modifying.
Query name
Displays the name for the current query. You cannot change the query name in this box. For more information, see Visual Database Tools Usage Considerations.
Output all columns
Specifies that all columns from all tables in the current query will be in the result set. Choosing this option is equivalent to specifying an asterisk (*) in place of individual column names after the SELECT keyword in the SQL statement.
DISTINCT values
Specifies that the query will filter out duplicates in the result set. This option is useful when you are using only some of the columns from the table or tables and those columns might contain duplicate values, or when the process of joining two or more tables produces duplicate rows in the result set. Choosing this option is equivalent to inserting the word DISTINCT into the statement in the SQL pane.
Destination table
Specifies the name of the table into which you are inserting rows. This list appears if you are creating an Insert query or Make Table query. For an Insert query, select a table name from the list.
For a Make Table query, type the name of the table to create. The Query Designer does not check whether the name is already in use or whether you have permission to create the table. To create a destination table in another database, specify a fully qualified table name, including the name of the target database, the owner (if required), and the name of the table.
GROUP BY extension
Specifies that additional options for views based on aggregate queries are available.
WITH CUBE
Specifies that the aggregate query should produce summary values for groups specified in the GROUP BY clause. The groups are created by cross-referencing columns included in the GROUP BY clause, and then applying the query's aggregate function to produce summary values for the additional super-aggregate rows. The WITH CUBE option is multidimensional, creating summaries from all combinations of aggregate functions and columns in the query.
WITH ROLLUP
Specifies that the aggregate query should produce summary values for the groups specified in the GROUP BY clause. The WITH ROLLUP option is similar to the WITH CUBE option, but creates only one type of summary for each combination of column and aggregate function.
ALL
Specifies that the aggregate query will include any duplicate rows in the summary.
Top
Specifies that the query will include a TOP clause, which returns only the first n rows or first n percentage of rows in the result set. The default is that the query returns the first 10 rows in the result set.
Use this box to specify a different number of rows to return or to specify a percentage.
Percent
Specifies that the query will include a TOP clause, returning only the first n percentage of rows in the result set.
With Ties
Specifies that the query will include a WITH TIES clause. WITH TIES is useful if a query includes an ORDER BY clause and a TOP clause based on percentage. If this option is set, and if the percentage cutoff falls in the middle of a set of rows with identical values in the ORDER BY clause, the query extends the percentage until all such rows are included.