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.
In order to create a new query in SQL Editor:
- select the Tools | New SQL Editor main menu item or use the corresponding toolbar button;
- click the Add new query item of the Navigation bar;
- edit the query text within the Edit tab of SQL Editor.
In order to create a new query in Query Builder:
- select the Tools | New Query Builder main menu item or use the corresponding toolbar button;
- build the query visually within the Builder tab of Visual Query Builder.
In order to open a query in SQL Editor:
- select the Tools | Show SQL Editor main menu item or use the corresponding 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 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 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.
In order to execute a query:
- create a new query or open an existing one;
- click the 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.
In order to save a query:
- create a new query or open an existing one;
- click the Save to file Navigation bar item (in SQL Editor) or the Save SQL Navigation bar item (in Query Builder), or use the Ctrl+S shortcut to save the query using the Save as... dialog;
- click the Save diagram Navigation bar item in Visual Query Builder to save the designed diagram;
or
- use the Save all Navigation bar item in SQL Editor if you need to save all the queries to one file.
See also: |