Imprimir

SQL Builder

This tool helps on the construction of Queries in a Wizard form. These queries can be saved and used later.

Database

Any SQL can run directly from the Run tab that’ll be available after selecting the database.

First you need to select the connection(Database) that you want to use.

List of connections

Tables

All the existing tables in the database are listed in the Tables tab.

Select the tables desired to create the query.

You can select various tables, although they need to have a relationship between them.

List of tables

Fields

Select the fields that’ll be part of the query. The fields can be ordered alphabetically (Ascendant) or in the order that they were created (Default)

Field list can alias creation

It’s possible to create an alias for the selected tables, this option can be found below the field list were also all the selected tables will be listed.

Joins

Defining the fields, it’s necessary to configure the join. To do that, you need to select the tables that have a relationship, next you’ll select the type of join that’ll used in the field Type then click on Add.

Join configuration

After clicking on add, click on Confirm, so that you can inform the fields that do the relationship between the tables.

Definition of field links

Defining the fields, you’ll be redirected to the run tab.

To add a “Where” clause to the SQL, click on the tab Conditions

Conditions

You can add the “where” clauses where the query was created.

Condition definition

Order By

Define the sorting of the query result display.

Defining the Sorting

Run

This is where you can run the SQL commands. The result of the query configuration wizard will be displayed on this tab. You can run DML (Data Manipulation Language) commands here and also DDL (Definition Data Language) commands.

Result display

You can define a total of records per page.

Viewing the query result

Saved

To save the created commands, just inform the name of the query and click on the save button. The commands that are already, will be listed.

Saving SQL command