Query Builder overview

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:

  • Working with a graphical representation of a query or with SQL code

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.

  • Join related tables

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.

  • Query or update databases

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.

  • Viewing and editing results immediately

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.

  • Work with subqueries

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.

  • Filtering condition on the selected columns and filtering condition on groups

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.

  • Aggregate query results

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.

  • Order queried 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.

  • Manipulating rows and columns sequence

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.

  • Review a generated SQL query

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.