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.
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. |
- 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.
An Outline Viewer is displayed to the right of the graphical display. This shows a high-level outline view of the SQL Statements.