Designing SQL SELECT Query using dbForge Query Builder for MySQL
Learn how to create SELECT query with MySQL Query Builder Tool by Devart, wrap a query into a subquery, and navigate through a query using Document Outline.
ℹ️ Read more about dbForge Query Builder for MySQL:
https://www.devart.com/dbforge/mysql/querybuilder/
💡 Download a 30-days trial version of dbForge Query Builder for MySQL:
https://www.devart.com/dbforge/mysql/querybuilder/download.html
✅ Subscribe to our channel:
https://www.youtube.com/user/DevartSoftware/
#MySQL, #Query, #MySqlSelectQuery, #QueryBuilder, #dbforge, #Devart
Closed Caption:
Welcome to Query Builder for MySQL Tutorials.
In this tutorial we will learn how to:
• visually design and select a query,
• wrap it into a subquery,
• navigate through a query using Document Outline.
You can open Query Builder from the Start
Page or the toolbar.
Your query will be displayed visually on the diagram.
To use Query Builder, drag the required objects from the Database Explorer.
As you can see, joins will be created automatically.
To view any of these joins, just double-click it.
By default, Query Builder is loaded with the SELECT type active.
But there are other types that you can switch to by using the pop-up menu.
To exclude columns that are not needed in the selection, check only the required ones.
Selected columns are automatically displayed in the Tabbed Editor.
Let's execute the query and look at the data it returns.
From the resulting data set, let's select
cities the names of which begin with the letter "C".
To do this, let's open the WHERE tab and create the corresponding condition.
As you can see, filtering was applied successfully and we received the requested data.
Let's change the query so that the cities
with the names beginning in "C" are omitted in the result.
As you can see, code completion suggests relevant keywords.
The changes are automatically displayed in the WHERE tab and filter.
Data is retrieved according to the specified condition.
These two tables can be converted into a subquery.
To do this, let's use the Wrap to subquery
functionality.
Now the tables are transformed into a subquery.
Drag the required object from the Database Explorer.
Let's select the required columns.
Now, let's join the table and the subquery
by "SalesTerritoryKey".
You can execute the root query - for this,
let's click "execute current statement" when
the "Root" tab is active.
And now you can execute the subquery.
To do this, let's click Execute current statement when the Subquery tab is active.
You can view the query structure using the Document Outline window.
In this case, you can see the subquery and the root query.
Using the Document Outline, you can easily navigate through all query elements.
If you accidentally forgot to save the query and closed the application, or if the application
crashed, that’s not a big deal - dbForge
will automatically save your data.
Let's open the application, and then open
the restored tab.
As you can see, the query has been successfully restored.
Thank you for watching our Query Builder for MySQL Tutorial
Video Length: 03:17
Uploaded By: Devart
Published: 6/26/2020
View Count: 3,088