Automatic Suggestions

This topic describes autocompletion features provided by dbForge Studio.

Automatic suggestion display while typing

From the first characters that you are typing in the SQL Editor, dbForge Studio determines the most relevant suggestions for the current context and displays them in a list. You can cancel the automatic display of suggestions or edit the delay time used to display them.

Word autocompletion

If you are typing first several characters of a database object name, and dbForge Studio finds only one match, it automatically inserts it to complete the word.

Automatic alias generation in SELECT statements*

dbForge Studio can assign an alias to each table object (table, view, function, synonym, sub-query) available in the FROM list of your SQL statement automatically.

Supporting queries to various databases

When typing statements within a database, you can get suggested objects of another database if you specify its name in the query text.

Usage of syntax highlight settings for the suggestions list

dbForge Studio highlights keywords, built-in functions and other objects in the suggestion list basing on corresponding settings of SSMS.

Highlight occurrences of an identifier*

The feature allows you to see all identifier occurrences. In a few moments after the pointer was placed over the identifier, all the identifier occurrences in the text will be highlighted.

Highlight occurrences

Pair highlighting

dbForge Studio highlights both the opening and closing code elements to visually define separate code blocks. This feature allows you to determine whether element pairs are properly paired and determine mismatched or misspelled paired code elements. To highlight a pair, click one element of the pair. For example, when you place a caret at the BEGIN or END keyword, dbForge Studio automatically highlights both matching keywords. dbForge Studio recognizes the following sets of delimiters: IF…ELSE, BEGIN…END, BEGIN TRY…END TRY, etc.

Context-based sorting of suggestions in the list

dbForge Studio sorts names of database objects by type and displays most relevant suggestions at the top of the list.

Automatic object filtering the suggestion list

dbForge Studio automatically filters object names and keywords in the list depending on what you are typing. Filtering is sensitive to the typed characters, symbols, white space and CamelCase. For example, if you type SELECT * FROM PC, compound names which elements start with the P and C characters (CamelCase) will be suggested.

Filtering suggestions

Suggesting methods for columns and variables*

dbForge Studio can suggest methods for columns and variables of the varchar(max), nvarchar(max), varbinary(max), and xml types.

For columns and variables of the varchar(max), nvarchar(max), and varbinary(max) data types, the WRITE method can be suggested.

For columns and variables of the xml data type, the query(), value(), exist(), modify(), and nodes() methods can be suggested.

All these methods can be suggested (except WRITE and nodes()) within calculated expressions and after column identifiers of these types with a point.

Notes

  1. The WRITE method can be called in UPDATE and SET statements only.
  2. The nodes() method can be called only in the FROM list.

Support of various query types**

dbForge Studio provides context-based suggestions and formatting in the following queries:

  • SELECT, INSERT, UPDATE, DELETE, USE, MERGE
  • CREATE (table, procedure, function, trigger, view. statistics, database)
  • ALTER (table, procedure, function, trigger, view, schema, database)
  • EXEC, DROP, GRANT, REVOKE, DENY, ENABLE TRIGGER, DISABLE TRIGGER
  • control flow statements (IF, WHILE), BEGIN … END blocks

Note
In all other statements, only context-based suggestions of keywords are supported.

Semi-transparent view of the suggestion box

When your code is overlapped by the suggestion box, hold Ctrl to make the suggestion box semi-transparent.

Sorting keywords by relevance*

Keywords in the suggestion list may be sorted by relevance. If the Sort keywords by relevance option is not selected, keywords are sorted in alphabetical order.

The feature allows grouping keywords in the suggestion list by the degree of keyword relevance to some specific context. This helps to determine the most appropriate keywords for commit.

The Sort keywords by relevance property is enabled (keywords are sorted by relevance)

List of keywords sorted by relevance

The Sort keywords by relevance property is disabled (keywords are sorted in alphabetical order)

List of keywords not sorted by relevance

Notes
* These features are available in the Standard edition of dbForge Studio only.
** The Express edition of dbForge Studio offers partial support of these features. Full support is available in the Standard edition only.