Query Development | About Teradata SQL Query Builder | Teradata Studio - About Teradata SQL Query Builder - Teradata Studio

Teradata® Studio™ Express User Guide - 17.20

Teradata Studio
Release Number
September 2022
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Teradata SQL Query Builder extends the Eclipse Data Tools Platform SQL Query Builder to provide execution on Teradata. SQL Query Builder provides a graphical interface to create, edit, or run SQL statements. It provides access to your database schema and objects so that you can quickly create or edit SQL statements without actually typing any SQL code. You also have the flexibility to add or modify the SQL code in the editor window.

Open the Teradata SQL Query Builder by right-clicking an SQL file in the Project Explorer, selecting the Open With option, then selecting Teradata SQL Query Builder from the list of Editor choices.

You must have a Connection Profile assigned for the SQL file.

Some syntactic variations might exist between Teradata SQL syntax and the SQL syntax that the Eclipse DTP SQL Query Builder supports; consequently, some SQL Query Builder features might not work with Teradata SQL syntax. For example, Teradata allows for abbreviated keywords such as "sel" for "select", or "ins" for "insert", which the DTP SQL syntax does not support.

If multiple SQL statements exist in the file, SQL Query Builder uses the first statement and ignores the rest. It also does not handle nested SELECT statements. The Teradata SQL Query Builder supports the following types of SQL statements:

SQL Statement Type Description
SELECT Creates a SELECT statement to retrieve data from a database and displays the result set in a table format.
INSERT Creates an INSERT statement to insert rows into the table.
UPDATE Creates an UPDATE statement to update data in a table.
DELETE Creates a DELETE statement to remove data from a specified table.
The SQL Query Builder provides tabs to edit the Columns, Conditions, Groups and Group Conditions.
  • Right-click the graphical area background add tables or create joins.
  • Right-click a table to add a table, create a join, replace a table, select all columns, deselect all columns, update an alias, and remove a table.
  • Drag table objects from the Data Source Explorer and drop them in the graphical display of the SQL Query Builder to add tables to your SQL statement.

The SQL Query Builder can also be launched from the SQL Editor context menu by selecting a SQL statement then choosing the option Edit in SQL Query Builder. The SQL Query Builder displays the SQL statement as well as a graphical view of the tables, columns, and table joins.

If you select an existing statement to edit in the SQL Query Builder, make sure the tables are qualified with the database name or the designated database from the Connection Profile is the database involved in the SQL statement. Otherwise, the SQL Query Builder does not recognize the columns and table joins for the graphical display. If you perform a "SELECT *", the columns are not selected (checked) in the graphical view of the table. Only columns specifically named in the query are selected (checked) in the graphical view of the table.

An Outline Viewer is displayed to the right of the graphical display. This shows a high-level outline view of the SQL Statements.