Howdy, folks! Welcome to another fun-filled blog post on Aqua Data Studio.
Let's face it, building queries may not be everyone's cup of tea.
Today we shall explore the Query Builder within the tool.
The Query Builder allows creating Multi-Database Queries for those database vendors who support them (MySQL, MS SQL Server, Sybase ASE, Teradata, etc.). Multi-Database Queries are submitted to the databases within a single registered server, not across different registered servers available in the Schema Browser.
To create a Cross Database Query:
1. Ensure you are connected to a server that allows Cross Database Queries.
2. Click the menu triangle at the top right of the Data Pane and choose [Add Database].
3. Pick one or more of the databases from the currently connected server you wish to include in the Cross Database Query from the [Add Database] Dialog and click [OK].
4. The databases will be added to the Database Pane.
5. Click one of the databases you added. The database will highlight in blue and its tables will appear in the Table Pane. Drag one of its tables into the Diagram Pane.
6. Click a different database in the Database Pane. The database will highlight in blue and its tables will appear in the Table Pane. Drag a table from it into the Diagram Pane. At this point you now have two table entities in your diagram from two different databases on the same server.
7. Drag a column from the Table Entity of the first database onto a column in the Table Entity generated by the second database. Check [Database Qualified Tables] in the [Query Menu] Query Options.
8. Notice that the SQL Pane now indicates the Multi Database query has been created and that you can see which database is the source for each table.
You can see how easy it was for you to create a Query from scratch using the powerful Query Builder within Aqua Data Studio!