Query Development | SQL History Form | Teradata Studio/Studio Express - SQL History Form - 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

The SQL History form provides an enhanced display of the history information. As you execute SQL statements from the SQL Editor or run functions from the Data Source Explorer, an entry is added to the SQL History list.

The history displays extensive information about each SQL execution, including execution elapsed time, DBMS time, fetch time, database server, row count, parameter display for macros and stored procedures, as well as displaying the SQL statement and SQL statement type.
Any passwords in the SQL statement are masked when displayed in the SQL History form. If you want to re-execute the query, you must edit the query to re-enter the password.

The SQL History form displays the data in a grid format that lets you select rows or cells, and you can copy cells or rows, sort columns, delete rows, edit the note or SQL for a history entry, filter columns, search for result history data, format the display, and re-execute SQL statements.

The SQL History uses an embedded Derby Database to manage the SQL History entries.

To re-open the form, go to Window > Show View > Teradata SQL History.

You can add notes manually by clicking on the Note column value. You can also choose to be prompted to add notes when you execute the SQL. See Setting SQL Handling Preferences.

You can sort columns in ascending and descending order with the exception of the Parameters column. For single column sorting, left-click the mouse button. For multi-column sorts, note the following:
  • Columns are movable and re-sizable. Many of the columns are grouped together under a collapsible header.
  • Rows can be selected by clicking in the numbered row header.
  • Column order, collapsed columns, filter, sort, and formatting are preserved from session to session.
  • If a filter is in effect, the result of a newly executed SQL statement is inserted as the top row, regardless of whether it meets the filter criterion. If a sort is in effect the new entry is inserted in the sorted order.
  • The Result column contains a summary of the executed SQL operation. To read the entire contents in a column cell, hover the mouse pointer over the cell. Error results show as red text in the resulting tool tip display. The following examples are samples of the Result summary.