Visual Query Builder
The Visual Query Builder helps you construct complex database queries without you having to know the syntax of SQL statements. A rich set of visual options are available to let you combine SQL clauses like JOINs, GROUP BY with properties like Indexes, Operators, Aliases, Sort Type, Sort Order and Criteria. Based on your selections, the visual query building tool in Aqua Data Studio will generate a complete SQL statement that can be executed. Features like the Index Manager and drag and drop to include JOINs save you time and make the process of building queries more powerful and intuitive.
Visual SQL Query Builder
Visual Query
To construct SQL queries without typing any SQL statements, open the Visual Query Builder window with a connection to a Database Server. Use the GUI to select tables or views with column selection choices allowing All Columns, Indexed Columns, Leading Indexed Columns or None. Use the “Search for” feature to find specific columns inside your Design Pane for easier access to different objects.
With the rich set of options available in the Aqua Data Studio visual query building tool, users can combine any of the SQL properties like JOINs, Indexes, Operators, Aliases, Sort Type, Sort Order, Criteria and make the process of writing queries more powerful and intuitive. Drag and Drop allows you to include tables, columns and views of a specific database or schema. Once the table is added into the diagram, you can view the query in the SQL panel. Execute SQL queries and view the results in different modes: Grid, Pivot Grid.
Create JOINS with Drag and Drop
To create a JOIN in an SQL query, drag table columns from one table entity to another in the diagram panel. The SQL panel displays the type of JOIN and its syntax instantly as changes are made. You can alter the JOIN type by double clicking on the Join line in the diagram and choosing the “Select All Rows” option.
GROUP BY and HAVING Clauses
Quickly insert GROUP BY Clause to a query by selecting the columns and an aggregate function (AVG, COUNT, COUNT_BIG, MAX, MIN, SUM) from the list and into the Group By deck.
Execute Queries for Editing Tables
Execute your query to retrieve query results in an editable, Excel-like grid. The Execute Edit feature is useful for altering, inserting, deleting, cloning and formatting data in the Table Data Editor.
UNION Queries
The Query Builder diagram pane can only display one SELECT clause. Therefore, when working with a UNION query, the Query Builder allows you to create an additional diagram in a tabbed layout to design multiple SELECT clauses which can then be UNION’ed together. The UNION keyword enables you to include the results of two or more SELECT statements in one resulting table.
Sub Queries and Derived Tables
The Query Builder allows you to create an additional diagram in a tabbed layout to design multiple SELECT clauses which can also be used as Sub Queries as part of the column list, WHERE clause or as a Derived table to participate in a JOIN clause.
Index Manager
The Index Manager helps you in optimizing SQL Queries by displaying the index sequence and prompting you to use indexes that will be more efficient. When an index is selected, the tool will color code the column criteria in all selected columns and enumerate the column index count. This allows you to quickly identify if the index will be used in the query. If the column index enumeration is not in numerical order, it is unlikely the index will be used in the query.
Save Query Builder Files
Once a query is designed it can be saved as a .QBW (Query Builder Workbook) file for reuse in the Visual Query Builder. You can save your query for future use, or to share with colleagues.
References
- ^ Query by Example Wikipedia article. Graphical query language, using visual tables where the user would enter commands, example elements and conditions.