Create queries on a diagram

dbForge Studio for SQL Server provides a visual query diagram for building queries where you can add or remove tables, define joins, apply filters, group data, and sort results in ascending or descending order. It also lets you change query types, set aliases for tables and columns, and manage the layout diagram by aligning tables and JOINs.

By default, a diagram for a SELECT statement opens. To change the query type, see Work with different query types.

Drag tables from Database Explorer to the diagram. If foreign key relationships exist between tables, the tool automatically creates joins and displays them on the diagram and on the Joins tab in the Tabbed Editor.

To add columns to the query, select the checkboxes next to the columns in the table shapes. Selected columns also appear on the Selection tab in the Tabbed Editor. For more information about working with a SELECT statement, see Design conditions for the SELECT clause.

You can then apply filters, group or sort the results, preview the query text, and run the query.

You can also move, resize, and align diagram shapes to the grid.