SQL Editor

This is the main window for running SQL against your database.

  • type an SQL statement into the text box and click on Run (or F5).
  • you can build SQL with minimal amounts of typing, reducing errors. The bottom panes contain common SQL keywords, and the column names from your table - click to add them to your SQL.
  • display the current values of a column by clicking on the Get Values button. In the example below these values are displayed in the right of the lower grids.
AQT's Run SQL window

Many features

This window is powerful window with a lot of functionality. Use it to:

  • Save / retrieve queries
  • Single-click table and column analysis
  • Export your data
  • Run your SQL under transactional control
  • Chart your data
  • Summarize your data
  • Syntax check of SQL
  • Explain Plan (for DB2 for LUW, DB2 z/OS, Oracle, SQL Server, Sybase, MySQL)
  • Format your SQL

Intellisense

The SQL window can give you a popup list of

  • Schema and Table names (in Select, Update, Insert and Delete statements)
  • Column names (in column lists, Where clauses, Order By, Group By and Set clauses)
  • Column functions. You can get a popup list of these by typing a fullstop after the column name
  • Column Values. When you type an = in a Where clause, AQT can give you a drop-down list of column values.
Intellisense can give you a number a helpful popups

Show Results

You can display your query results either in a separate Data Display window, or in the SQL window.

  • You can have multiple tabs of results
  • You can refresh the results in a tab, or revert the SQL to the query used to generate this set of results
Displaying the query results on the Run SQL window

SQL History

AQT maintains a history of the queries you have run.

  • This is saved (indefinitely) on disk between AQT sessions
  • Different history files can be used each day, week or month
  • History information includes response message plus elapsed time. This makes it easy to locate the SQL you are interested in
SQL History

Run SQL Script

If your SQL contains multiple statements, AQT will show you the Run Multiple SQL Statements window.

  • Scripts can contain tens of thousands of SQL statements
  • There are many options for the delimiter used in the SQL scripts
  • Scripts can be paused and restarted
  • Failing SQL can be corrected and rerun
  • Your SQL can display data; these can go to the same or different display windows
Running an SQL script