Previous Next

SQL Editor in dbForge Studio for SQL Server

Most of the time you interact with a database by writing and executing SQL queries, statements, stored procedures, and scripts. Therefore, it is clear that a good (or rather perfect) SQL editor is a must tool for any developer.

While designing SQL editor for dbForge Studio for SQL Server, we intended to create a tool to satisfy both professional developers and beginners. We tried to create an editor, that is meant to simplify, optimize and, above all, save your time while working with SQL documents.

Colorized Statements

The statements marked with different colors can be easily distinguished inside the code so that it helps you find the required table, object names, values, strings, etc.

Context-sensitive code completion

SQL editor extracts the context-sensitive features from the code and provides the list with hints to code elements, thus, allowing you to automatically complete the current code with the corresponding components depending on the context.

Code collapsing/expanding with support of user-defined regions

Whenever you have a "block" of code (BEGIN....END, etc), SQL editor will put a little plus-sign in the margin and allow you to "collapse" that block of code so that you can only see the BEGIN, not stuff underneath. If you're working with a really large set of code, that's helpful.

SQL formatting with rich options

Improve readability, consistency, and standardization, as well as customize the code with SQL formatting. The feature allows you to define and share SQL coding standards among multiple developers easily and effortlessly. SQL editor includes a wide range of options for code formatting. Depending on your needs, you can format the whole code, the current or selected statement by right-clicking the corresponding option on the shortcut menu, which, in turn, will significantly save your time.

You can use SQL Formatter Wizard to edit multiple SQL files and directories at once. In addition, it is possible to customize the pre-defined profiles to your requirements by selecting the corresponding formatting options.

SQL snippets library with a browser window and editor

Code snippets are meant to help you type SQL code quickly. You can use predefined snippets provided in the application and create your own to insert them in SQL scripts and queries. Each snippet represents a statement or a group of statements performing the same task, such as creating a new user or describing a package. You can add the required code snippet into your source code with a few mouse clicks.

Document Outline window for a quick navigation through large scripts

This window provides quick and easy navigation through the whole document. It can be used while building a report to access all report's elements and to see the whole report's structure. With this feature, you can easily synchronize the structure of SQL query in the code with the one in Document Outline. As a result, matching statements will be hihglighted.

One-step access to a schema object editor from code (go to definition)

This option allows you to open Visual Object Editor and explore DDL objects with their properties. If the definition is outside of the current script, an object editor or a corresponding DDL script will open in another window. You will appreciate this feature even more while working with SQL scripts in a database project. A project can contain SQL scripts and query files located in different folders and on different discs, but thanks to the Go to definition option you still can navigate to the definitions of database objects from the scripts where these objects are mentioned.

Parameter information for stored procedures and functions

The feature will help you quickly see the names and types of parameters, which are used in a function or stored procedure script. All information is neatly displayed in the Parameter Info tooltip. The parameter in bold is the next parameter that is required for the function or stored procedure.

Quick information about schema objects

The Quick Info feature is a tooltip with brief information about database objects, parameters, and variables. The tooltip appears when you place the mouse pointer on the required item in the SQL script or press the shortcut Ctrl+K and then I. In case of database objects, the tooltip shows their location and types. You will find this option useful while working with large scripts.

Executed SQL history window for the document

The Execution History window provides the full information about all the queries you have recently executed, including size, execution date and duration, file name, server, the database used and a user who performed this script. In addition, you can view the whole text of the query by clicking the corresponding statement.

To view the execution history, click the View tab on the Main menu, go to Other Windows and select Execution history in the drop-down menu. Alternatively, you may press Ctrl+Alt+H to open the Execution history window.