Insert columns with the column picker

This section describes the following features:

The column picker in SQL Complete allows selecting multiple columns for tables or views specified in the SELECT statement.

The column picker pops up in the SELECT and INSERT statements as well as in the GROUP BY and ORDER BY clauses.

Column Picker

By selecting the necessary checkboxes, it is possible to auto-insert the SELECT statement with the required columns from the SELECT suggestion list, as well as the FROM clause with the selected table.

The column picker invoked in the SELECT statement with the table indicated in the FROM clause, displays the following:

Column Picker

The column picker invoked in the SELECT statement followed by the JOIN clause, displays the following:

Column Picker

The column picker invoked in the ORDER BY clause for a CTE query, displays the following:

Suggestions for ORDER BY clause

Select columns

As the user starts typing, the list of columns is filtered to show only those that match the entered characters.

  • Use the Up and Down arrow keys to navigate through the list.

  • The Space key allows selecting columns in the Column Picker. This works only if no characters were entered to find the column name.

  • The Insert key allows selecting/deselecting columns regardless of whether the user entered any characters to find the column name or not.

Insert selected columns

Press Enter to insert the selected columns. The columns are inserted according to the order in which they were selected.

Qualified column names

Inserted column names are qualified in case:

  • The user has enabled the Qualify column names with the table name option on the Advanced options tab.

  • The user has specified more than one table in the FROM clause, and the column names would be ambiguous without specifying the table they belong to.

In the example below, the Qualify column names with table name option has been enabled:

Table Name Option

In the example below, SQL Complete has automatically qualified certain column names to avoid ambiguity:

Automatic Column Qualification

Only the columns that appear in more than one table are qualified.

It is possible to make certain columns qualified with the table alias. This happens when aliases are assigned to table names, and the Qualify column names with table aliases option is disabled. For instance:

Disabled Option

It is also possible to make all columns qualified with the table alias. This happens when aliases have been assigned to table names and the Qualify column names with table aliases option is enabled. For instance:

Enabled Option

It is easy to customize the way aliases are created and inserted. To learn more, refer to Operations with aliases.

Non-aggregated columns in GROUP BY

This feature lets you add all non-aggregated columns after the GROUP BY keyword. As you type, the tool suggests columns from the SELECT list. You can insert these columns all at once by selecting the SELECT List checkbox or add them one by one in the required order. After you select a column, it will be automatically added to the query.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge SQL Complete for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the SQL Complete in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the SQL Complete for your business, request a demo to see it in action.
Ready to start using dbForge SQL Complete for SQL Server?