Query Builder overview

Last modified: March 2, 2023

Query Builder is designed to enhance productivity and simplify SQL query building tasks. Query Builder provides a graphical user interface for creating SQL queries. You can drag-and-drop multiple tables, views and their columns onto a visual designer to generate SQL statements.

You can use Query Builder to perform the following tasks:

Query Builder includes a pane that displays your query graphically and a pane that displays the SQL text of your query. You can work in either the graphical pane or the text pane. Query Builder synchronizes the views so that they are always current.

If you add more than one table to your query, Query Builder automatically determines how the tables are related and constructs the appropriate JOIN command.

You can use Query Builder to return data by using SELECT statements and to create queries that update, add, or delete records in a database.

You can run your query and work with a record set in a grid that allows you to scroll through and edit records in the database.

With dbForge Query Builder for SQL Server, you can visually create subqueries in SELECT statements, navigate through complex queries and subqueries, as well as convert tables into subqueries by using the Wrap to Subquery functionality.

You can use WHERE and HAVING (used for aggregated values) clauses in your queries to set up specific filtering conditions to get only the records matching your criteria.

dbForge Query Builder for SQL Server supports the GROUP BY clause in the SELECT statement by using which you can combine rows with the same values in groups or add aggregate functions to create summarized data.

With dbForge Query Builder for SQL Server, you can add the ORDER BY clause available in the SELECT statement to sort the returned data by an expression or column.

In Query Builder, you can easily add, remove, or change the order of columns in the Tabbed editor or on the diagram. In addition, you can specify a filtering criteria or aggregate functions for the column, or retrieve only distinct values of the column.

When you design a query, Query Builder automatically generates a query in a SQL format, which you can modify. All the changes will be synchronized and displayed on the diagram.