T-SQL Context Prompt - Code More Efficiently!

dbForge SQL Complete and its embedded T-SQL prompts give you a chance to implement code routines rationally. T-SQL context prompt accelerates SQL code writing by offering a list of database objects and T-SQL statements to be inserted based on the context of what you type in the SQL editor. The feature brings a vast improvement to code quality and saves you the trouble of typing SQL queries manually.

SELECT suggestion

Use the column picker for simple selection of required columns.

FROM suggestion

The FROM block contains tables, views, table functions, XML vars, table vars, and datetime vars.

FROM Suggestion

GROUP BY suggestion

Use the column picker in blocks with multiple choice.

GROUP BY Suggestion

HAVING suggestion

The columns suggestion is available in the HAVING block, while setting function parameters.

HAVING suggestion

ORDER BY suggestion

If you declared columns and aliases in the SELECT statement, the suggestion list will show them in the ORDER BY statement.

ORDER BY suggestion

TOP suggestion

Suggestion of functions and variables is available in the TOP statement.

TOP suggestion

OFFSET suggestion

In the OFFSET statement, depending on its context, the suggestion of keywords, variables, or objects is available.

OFFSET suggestion

SELECT INTO suggestion

While creating a table with the help of SELECT INTO statement, the database schema suggestion is available.

SELECT INTO Prompt

FOR XML suggestion

Keywords suggestion for the FOR XML clause is available.

FOR XML suggestion

Window and ranking functions suggestion

Columns and objects suggestion for window and ranking functions is available.

Window and ranking functions suggestion

COLLATE suggestion

For all string data the COLLATE suggestion is available.

COLLATE suggestion

Automatic generation of the JOIN clause

You can use the automatically created JOIN statement while combining tables. You can also select table objects from a required schema manually, in case you need a specific join operation.

Automatic generation of the JOIN clause

JOIN suggestion

You can select the pre-set JOIN statement for tables that are joined by foreign keys and column names.

JOIN suggestion

INSERT suggestion

Use the column picker to select required columns to be included into the INSERT statement.

INSERT suggestion

INSERT VALUES suggestion

Variable and scalar functions are suggested in the VALUES block for the INSERT statement.

INSERT VALUES suggestion

OUTPUT suggestion

There is a possibility to display required data using INSERTED, in the OUTPUT statement.

OUTPUT suggestion

INSERTED or DELETED prefix suggestion for logical tables

Columns suggestion list is available for the INSERTED or DELETED statements.

INSERTED or DELETED prefix suggestion for logical tables

INTO suggestion

There is a possibility to insert execution results into the available table object.

INTO suggestion

Suggestion for XML in FROM clause

XML vars suggestion is available in the FROM statement.

Suggestion for XML in FROM clause

Built-in method suggestion for XML datatypes

Suggestion for built-in methods is available for XML-type variables.

Built-in method suggestion for XML datatypes

XML alias suggestion

Suggestion for built-in methods is available for XML-type variables via aliases.

XML alias suggestion

XML built-ins suggestion in SELECT

The SELECT statement displays custom variables and built-in methods to work with these variables.

XML built-ins suggestion in SELECT

XML built-ins suggestion in SET

While modifying XML data, an appropriate method is suggested.

XML built-ins suggestion in SET

XML column suggestion

Suggestion of built-in methods for XML columns.

XML column suggestion

PIVOT suggestion

Columns and aliases suggestion is available for the PIVOT statement.

PIVOT suggestion

SET IDENTITY_INSERT suggestion

In the SET statement the suggestion list shows objects, if it is allowed by syntax.

SET IDENTITY_INSERT suggestion

Variables suggestion for SET commands

For the SET statement that expects a value, the suggestion list shows appropriate variables.

Variables suggestion for SET commands

SET command suggestion

Extended suggestion for all the SET options is available.

SET command suggestion

UPDATE suggestion

Custom tables and views are suggested in the UPDATE statement.

UPDATE suggestion

UPDATE SET suggestion

The suggestion list shows all the available columns for the selected object. You can refer to these columns via the name of the object that is being updated.

UPDATE SET suggestion

Updating value suggestion

For the column, that is being updated you can set a value using either a custom or a system function.

Updating value suggestion

Linked servers suggestion

Linked servers suggestion is supported.

Linked servers suggestion

Linked server objects suggestion

The suggestion list shows all the existing objects for every linked server.

Linked server objects suggestion

ALTER objects suggestion

The suggestion list shows an object name depending on the ALTER statement type.

ALTER objects suggestion

DROP objects suggestion

The suggestion list displays context-based objects in the DROP statement.

DROP objects suggestion

Column datatype suggestion in CREATE TABLE statement

The suggestion list shows all the available data types while creating a new table.

Column datatype suggestion in CREATE TABLE statement

Columns suggestion in ALTER TABLE statement

Extended suggestion syntax for the ALTER statement allows to see custom objects and available columns.

Columns suggestion in ALTER TABLE statement

CURSOR suggestion

The suggestion list shows all the available cursor variables in the CURSOR statements.

CURSOR suggestion

FETCH suggestion

The suggestion list shows custom variables in the FETCH statement.

FETCH suggestion

DELETE FROM suggestion

The suggestion list shows custom tables and views for the DELETE statement.

DELETE FROM suggestion

WHERE suggestion

The completion list shows available columns and scalar functions for a selected object in the DELETE statement.

WHERE suggestion

TRUNCATE suggestion

The completion list shows custom tables in the TRUNCATE statement.

TRUNCATE suggestion

Breadcrumb and default schema suggestion

In case you do not specify a schema explicitly for a user with the default schema assigned, for example, a "Sales" schema, the suggestion list shows objects from a default schema. In case you specify the database and do not specify the schema like the following "SELECT * FROM AdventureWorks2019", the suggestion list shows objects from a default schema as well. If you select any table from the suggested list from the default schema and commit the selection from a completion list, SQL Complete will insert the table name without a schema prefix.

Breadcrumb and default schema suggestion

Filtering objects by specified schema

In case you specify a schema explicitly, the suggestion list shows objects from the specified schema.

Filtering objects by specified schema

CTE suggestion

Common Table Expressions (CTE) suggestion is supported.

CTE suggestion

Recursive CTE suggestion

For the recursive CTE statements the suggestion list shows scalar functions, columns, and aliases.

Recursive CTE suggestion

Triggers suggestion

Suggestion of DML and DDL triggers is supported.

Prompt on Triggers

Virtual table suggestion

The suggestion list shows virtual tables (DELETED/INSERTED) in the trigger body.

Virtual table suggestion

Column suggestion for logical tables

The suggestion list shows columns to which you refer using logical tables (DELETED/INSERTED).

Column suggestion for logical tables

Synonym suggestion

Synonyms suggestion for custom objects is supported.

Synonym suggestion

Query hints suggestion

You can specify a hint for the query optimizer.

Query hints suggestion

Prompting hints names for the USE HINT option

The USE HINT query hint argument provides a method to add behavior to a single query and lets you drive the query optimizer without elevated credentials or without being a member of the sysadmin server role.

USE HINT option

Table hints suggestion

You can use table hints.

Table hints suggestion

SQLCMD mode suggestion

The suggestion list shows variables in the SQLCMD mode.

SQLCMD mode suggestion

SQLCMD Commands suggestion

The suggestion list shows commands available in the SQLCMD mode.

SQLCMD Commands suggestion

System variables suggestion

The suggestion list shows system variables in the places where a value is expected.

System variables suggestion

Label suggestion

If the script contains a label, the suggestion list shows one in the GOTO context.

Label suggestion

DBCC command suggestion

DBCC commands suggestion is supported.

DBCC command suggestion

Support for the DBCC CHECKIDENT command

SQL Complete tool supports DBCC CHECKIDENT command and prompts table_name arguments for it.

Label suggestion

Suggestion for hierarchyid datatypes

The suggestion list shows built-in methods for hierarchical data types.

Suggestion for hierarchyid datatypes

BULK INSERT suggestion

Extended syntax suggestion for the BULK INSERT statement is supported.

BULK INSERT suggestion

Stored procedures and functions suggestion

The suggestion list shows stored procedures and functions in the EXEC statement.

Stored procedures suggestion

MERGE suggestion

The suggestion list shows columns and aliases in the MERGE statement.

MERGE suggestion

RAISERROR suggestion

For the vast majority of T-SQL statements the suggestion list provides extended syntax prompts.

RAISERROR suggestion

PRINT suggestion

The suggestion list shows scalar functions and custom variables for the PRINT statement.

PRINT suggestion

DECLARE TABLE suggestion

Suggestion for the DECLARE TABLE statement is supported.

DECLARE TABLE suggestion

Table variable suggestion

The suggestion list shows table variables and columns.

Table variable suggestion

Temporary table suggestion

The suggestion list shows temporary tables variables and columns.

Temporary table suggestion

User and role suggestion

The suggestion list shows current users and roles for the current database.

User and role suggestion

Datatypes suggestion

The suggestion list shows the data types for variables.

Datatypes suggestion

User-defined table-type suggestion

The suggestion list displays user-defined tables and columns while you are writing a query.

User Defined Table Type Suggestion

CREATE INDEX suggestion

Use a suggestion while creating a nonclustered in-memory columnstore index for a SQL Server table.

CREATE INDEX Suggestion

Prompting indexes in WITH clauses

Index selection in WITH clauses can greatly speed up your coding and thus improve your overall performance.

User Defined Table Type Suggestion

SEQUENCE suggestion

The SEQUENCE suggestion is supported.

SEQUENCE suggestion

Column suggestion while declaring indexes

Columns are suggested when declaring indexes.

GROUP BY Suggestion

CROSS/OUTER APPLY suggestion

Suggestions are available in queries that include a correlated subquery.

Column suggestion while declaring indexes

Suggestion of objects declared in a script

Objects declared in a script are suggested.

Column suggestion while declaring indexes

JSON suggestion

JSON and JSON AUTO as well as JSON PATH keywords are suggested.

Suggestion of objects in JSON statements

Logins suggestion

Suggestions are prompted for the following statements:

  • ALTER LOGIN
  • DROP LOGIN
  • CREATE LOGIN
Suggestion of logins in ALTER LOGIN statements

Transactions suggestion

The suggestion list displays available transactions.

Suggestion of transactions

Filegroups suggestion

The suggestion list shows filegroups in ALTER DATABASE, CREATE PARTITION, and CREATE TABLE statements.

Suggestion of filegroups in ALTER DATABASE statements

CREATE SECURITY POLICY suggestions

The suggestion list displays the relevant objects.

Suggestion of objects in CREATE SECURITY POLICY statements

ALTER MESSAGE TYPE

The function allows users to change the name of the message type.

ALTER MESSAGE TYPE

DROP MESSAGE TYPE

With this function, users can easily delete the name of the message type.

DROP MESSAGE TYPE

CHECK and DEFAULT constraints

A suggestion list for the CHECK and DEFAULT constraints is available.

Display a list of CHECK and DEFAULT constraints

OLE DB provider suggestions

OLE DB provider names are suggested for OPENROWSET and OPENQUERY.

OLE DB provider suggestions

XML methods suggestion XQuery

The suggestion list of XML methods is supported for XQuery.

XML methods suggestion XQuery

CREATE TYPE .. AS TABLE

In the CREATE TYPE statement, the command suggests context-based prompts for data types and primary keys of server objects.

CREATE TYPE .. AS TABLE

CREATE TYPE .. FROM

Suggestion of context-based prompts is available in the CREATE TYPE ...FROM statement.

CREATE TYPE .. FROM

SET DATEFORMAT

The SET DATEFORMAT block contains a list of variables and formats when specifying a date.

SET DATEFORMAT

SEND ON CONVERSATION

The prompt list of message types and variables is supported in the SEND ON CONVERSATION clause.

SEND ON CONVERSATION

CREATE QUEUE

The list of user, file groups, schemas, databases, and procedures is available in the CREATE QUEUE clause.

CREATE QUEUE

CREATE AGGREGATE

Depending on the context, the suggestion list will display available schemas, data types, assemblies, and methods in the CREATE AGGREGATE block.

CREATE AGGREGATE

CREATE ASSEMBLY FROM

When inserting objects into the FROM block and their correct further renaming, the list of prompts for aggregates is added.

CREATE ASSEMBLY FROM

DBCC CLONEDATABASE

The DBCC CLONEDATABASE database management command is supported.

DBCC CLONEDATABASE

Prompting time zones in AT TIME ZONE

AT TIME ZONE converts an inputdate to the corresponding datetimeoffset value in the target time zone. The SQL Complete tool suggests time zones when writing SQL queries, helping format your SQL instances and handle all time zone calculations.

CREATE ASSEMBLY FROM

Suggesting properties for the built-in metadata functions

Properties for built-in metadata functions (SERVERPROPERTY, FILEPROPERTY, DATABASEPROPERTYEX, etc) are now prompted, allowing you to make full use of the system catalog to find out more about a database.

Suggesting properties for the built-in metadata functions

Temporary tables suggestion

Temporary tables variables and columns are suggested regardless of the database specified in the USE statement.

Temporary tables suggestion

OPENJSON objects suggestion

SQL Complete can suggest SQL server objects when working with OPENJSON SQL Server table-valued function.

OPENJSON objects suggestion

Support for the GRANT ALTER ANY statement

SQL Complete supports the GRANT ALTER ANY statement, cutting time and reducing errors when working with permissions on a database in SQL Server.

Support for the GRANT ALTER ANY statement

Support for the CREATE AVAILABILITY GROUP statement

SQL Complete supports the CREATE AVAILABILITY GROUP statement helping to quickly create a new availability group, if the instance of SQL Server is enabled for the Always On availability groups feature.

Support for the CREATE AVAILABILITY GROUP statement

Support for the ALTER EXTERNAL LIBRARY statement

SQL Complete prompts the ALTER EXTERNAL LIBRARY statement when you need to upload the library bits to the database.

Support for the ALTER EXTERNAL LIBRARY statement

Support for the DROP EXTERNAL RESOURCE POOL statement

SQL Complete suggests the DROP EXTERNAL RESOURCE POOL statement used to Delete a Resource Governor external resource pool needed to define resources for external processes.

DROP EXTERNAL RESOURCE POOL

Support for the ADD/DROP SENSITIVITY CLASSIFICATION statement

SQL Complete prompts sensitivity label and information type attributes as well as marks columns containing personal or confidential information in the suggestion window.

ADD/DROP SENSITIVITY CLASSIFICATION

Suggestion of ALGORITHM in CREATE ASYMMETRIC KEY

The suggestion list of the algorithm includes RSA_2048, RSA_1024, and RSA_512.

Suggestion of ALGORITHM in CREATE ASYMMETRIC KEY

Suggestion for DBCC SHOW_STATISTICS

SQL Complete displays the suggestion of context-based keywords and objects in the DBCC SHOW_STATISTICS statement.

Suggestion for the DBCC SHOW_STATISTICS objects

Support for COLUMN MASTER KEY

SQL Complete suggests context-based keywords in the CREATE COLUMN MASTER KEY statement.

Support for COLUMN MASTER KEY

Suggestion for COLUMN ENCRYPTION KEY

The COLUMN MASTER KEY server object and ALGORITHM are now suggested in the CREATE COLUMN ENCRYPTION KEY statement.

Suggestion for COLUMN ENCRYPTION KEY

Suggestion for CONTAINS

In the CONTAINS predicate, SQL Complete can suggest a list of columns specified in the FROM statement, a list of languages for LANGUAGE, and variables for the DECLARE statement.