Online Documentation for SQL Manager for DB2

Create SQL statements rapidly


There are two options for creating SQL queries rapidly:

 

In the DB Explorer

  1. Right-click a table in the DB Explorer
  2. Choose Script to New SQL Editor context menu item.
  3. Select the necessary query type.

 

In the Visual Query Builder

  1. Open Visual Query Builder.
  2. On the Builder tab drag an object from the DB Explorer tree to the diagram area.
  3. Choose necessary fields to include in the query by checking the corresponding box located to the left from the field name in the list, or just by double-clicking it. To include all fields of the table/view, check the box located to the left of the table/view caption.
  4. Associate two objects by their fields.Drag a field from one object list to another. This will set a link between these objects by the selected fields. It is indicated by a bidirectional arrow between the linked fields.
  5. Edit link properties. Double-click the linking arrow or right-click it and select the Property popup menu item. The Link properties dialog allows you to change the association condition by choosing it from the drop-down list.
  6. You can view and edit your SQL statement on the Edit tab of the Visual Query Builder.