SQL Document Overview

Most of the time you interact with a database by writing and executing SQL queries. In this way, SQL document is an essential part of every database tool in dbForge product line. It is a place where you create SQL statements in order to run them against a database server. This topic gives you an overview of SQL document layout, views, and functions.

To create a new SQL Document:

On the Standard toolbar, click New SQL.

Alternatively, double-click near the tab of the other opened SQL Document, and the new document will appear. Please note, that this way of creating a new document will work only provided that you have other documents opened.

The following image is an example of the SQL document.

SQL document

Note

Actual document look may slightly vary from the image above, depending on the product you use.

SQL Document Overview

Each SQL document includes different representations of the content. They are called document views. On the above screen-shot you can see two document views: Text and Data.

  • Text view contains SQL editor which allows you to write SQL statements.
  • Data view, typically shown after a query is executed, displays a data editor with result sets returned by a database server.

To switch to a specific view:

  • Click a button with a view name on the bottom-panel of the document.
  • Right-click document bottom-panel to open the shortcut menu and select a view from the list.

Representing Query Execution Results

The query execution results can be represented in two ways - in text and in grid formats.

To represent results as text, on the SQL toolbar, click the Results as Text button before query execution. The following image represents a sample of query execution results in text format.

Query results as text

To represent results as grid, on the SQL toolbar, click the Results as Grid button before query execution. The following image represents a sample of query execution results in grid format.

Query results as grid

Document Layout

SQL document has two types of view layout: Split Layout and Combined Layout. To switch document layout use appropriate buttons at the bottom-right corner of the document.

Split Layout

In the split layout a document has one prominent (main) view which is aligned to the top of the document view port. Other views are called additional, they are displayed in the bottom area of the document view port.

Main view remains always in split layout visible and you can toggle only additional views. But you can see two views at a time to avoid unnecessary switching.

To temporary hide additional document views, click the Downwards double arrow Hide/Show additional document views button at the bottom-right corner of the document, or just press CTRL+R.

To change the main document view, use the Swap main and additional documents views button to swap the main view and active additional view.

Combined Layout

In the combined layout you can see only one view at a time. A document view fills entire document view port. Typically, you need this layout when you a focusing on one specific document representation (for example, when you extensively work with data).

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

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

Request a demo

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