Online Documentation for SQL Manager for DB2

Query Management Tools


When using SQL Manager for DB2, you are provided with two basic tools you may need to manage your SQL queries: SQL Editor for editing SQL query text directly and Visual Query Builder for building queries visually. Find the list of common SQL query management operations below.

 

 

Creating New Queries

 

In order to create a new query in SQL Editor:

 

In order to create a new query in Query Builder:

 

Editing Queries

 

In order to open a query in SQL Editor:

  • select the Tools | Show SQL Editor main menu item or use the corresponding btnShowSQLEditor toolbar button;
  • use the numbered tabs at the bottom of the editor window to switch between previously edited queries. The last edited query is displayed automatically on opening the editor;
  • edit the query text within the Edit tab of SQL Editor.

 

In order to open a query in Query Builder:

  • select the Tools | Show Query Builder main menu item or use the corresponding btnShowQueryBuilder toolbar button;
  • the last edited query is displayed automatically on opening Query Builder;
  • to load a previously saved diagram, click the Load diagram item of the Navigation bar;
  • to load a query from an *.sql file, open the Edit tab and click the Load SQL button of the Navigation bar;
  • edit the query visually within the Builder and/or the Edit tabs of Visual Query Builder.

 

In order to load a query from an *.sql file:

  • select the Tools | New SQL Editor main menu item or use the corresponding btnNewSQLEditor toolbar button;
  • click the Load from file item of the Navigation bar;
  • browse for the query file using the Open SQL File dialog;
  • edit the query text within the Edit tab of SQL Editor.

 

Executing Queries

 

In order to execute a query:

  • create a new query or open an existing one;
  • click the btnExecuteQuery Execute item of the Navigation bar or use the F9 hot-key to execute the query;
  • view/edit the returned data within the Results tab of SQL Editor.

 

Saving Queries

 

In order to save a query:

or