SQL Coding Assistance

This page provides more information about the SQL Coding Assistance features provided by dbForge Studio for SQL Server.

Code completion

Context-sensitive name suggestions

The application suggests object names for use at a certain position of the code.

SQL Code Completion

Object member lists

A list of valid members for current object appears when you type the period (.) symbol after the object name.

Object Member Lists

Column picker for quick list building

You can select required columns from the prompt list using only the mouse to add them to your SQL query document.

Column Picker for Quick List Building

JOIN clause auto generation

The application suggests a full JOIN clause based on foreign keys, or it can suggests conditions that are based on column names.

JOIN Clause Auto Generation

Wildcard expansion

You can replace the asterisk (*) symbol with the list of columns from the required table or view on pressing the Tab key.

Wildcart Expansion

Auto-generation of table aliases

Once you have entered an object name, the application automatically generates an alias for it in the FROM list of your SQL document.

Auto-Generation of Table Aliases

INSERT, EXEC, and ALTER statements expansion

You can type available table names, views, procedures, functions or triggers in ALTER, INSERT, EXEC statement and expand the statement to the full template by pressing the Tab key.

INSERT, EXEC, and ALTER Statements Expansion

Adjust keyword case on typing

The application recognizes what you are typing, and converts the keywords to uppercase letters, in case you are writing in lowercase.

Adjust Keyword Case on Typing

Context-sensitive keywords suggestion

The application analyzes the context in order to predict what you may type next, and displays only relative keywords and names of database objects.

Context-Sensitive Suggestion of Keywords

Database context detection

The application displays the list of database objects from the current database or schema.

Database Context Detection

Smart filtering in the suggestion list

The application filters names of objects and keywords in the list automatically based on what you are typing, and suggests relative ones.

Smart Filtering in the Suggestion List

Semi-transparent suggestion box

You can hold Ctrl to make the suggestion box switch to semi-transparent view to look through it without closing.

Semi-Transparent View of the Suggestion Box

SQL code formatting

The application offers:

  • A wide set of code formatting options
  • Batch formatting of SQL files
  • Auto-formatting of code pasted from the clipboard
Learn more
SQL code formatting

SQL snippets

This feature allows you to:

  • Select a template from the drop-down list
  • Add new templates and edit existing ones by using snippet manager
  • Preview all the snippets using the code snippets window, and drag-and-drop required snippet directly to the SQL text editor
SQL snippets

Quick database object information

Quick object information

Hover the screen cursor over a database object to see its details.

Quick object information

Parameter information for functions

The application also displays a hint with information about the function and its parameters when you call any built-in or user-defined function in a query.

Parameter information for functions

Code navigation

Document Outline window

The Document Outline window displays the logical structure of currently opened SQL document, and allows you to view and navigate statements in SQL documents.

Document Outline window

"Go to definition" for database objects

This option allows you to open Visual Object Editor and explore DDL objects with their properties.

Go to Definition for Database Objects

Highlight occurrences of an identifier

You can hover the screen cursor over an identifier to see all its occurrences in the text.

Highlight Occurrences of an Identifier

Phrase Completion

The application suggests not only separate keywords and object names, but entire code phrases. For instance, OUTER APPLY instead of APPLY, and ORDER BY instead of ORDER are prompted in the SELECT query. For a complete list of supported phrases, see product documentation.

Phrase Completion

Clauses prompt of the MERGE statement

The prompt suggests clauses of the MERGE statement, that determine whether to update or insert into the target table or view.

Clauses prompt of the MERGE statement