Working with Tables and Views in the SQL Diagram Pane

From RapidSQL
Jump to: navigation, search

Go Up to Using Query Builder

Query Builder lets you organize your tables and views in the SQL Diagram Pane. You can also customize appearance, change visual aspects, and adjust layout while continuing to manufacture a query. You can resize or customize a selected table and view, or move them to the front or back of the diagram. The key symbol indicates a column that is indexed or participates in a primary key.

Query Builder can automatically dictate a layout in the SQL Diagram Pane using the Auto Layout button. For details, see Auto Layout.

Selecting and Deselecting Tables and Views

You can select tables and views in the SQL Diagram Pane. You can make changes to more than one table or view simultaneously by selecting multiple tables or views.

To select and deselect Tables and Views, do the following:

  1. To select a table, click the table title bar.
  2. To select more than one table, drag the pointer to enclose all target tables with the bounding line.
    Query Builder selects all target tables; none have handles.
  3. To select all tables, in the SQL Diagram, right-click, and then click Select All.
  4. Click the SQL Diagram workspace to deselect all tables.

Moving Tables and Views

Query Builder lets you move tables and views in the SQL Diagram Pane. It also moves selections and joins with the tables and views.

To move Tables and Views, do the following:

  1. To move a table or view, drag the title bar to the target location.
Note: If you select more than one table or view, Query Builder moves all selected tables and views and any joins with the pointer.

Moving Additional Tables and Views to the SQL Diagram Pane

Query Builder sets tables and views in your statement in the order that you move them to the SQL Diagram Pane. Tables and views moved into the Diagram Pane appear first in your statement, including all joins connecting that table. To change the order of tables, move them back into the Table Tree and re-select them in the order in which you would like to join them.

Moving Additional Tables or Views

To move additional tables or views, do the following:

  1. Click the target table or view and drag it to the Diagram Pane.
    For multiple tables or views: Use SHIFT+click for adjacent tables or views or use CTRL+click for nonadjacent tables and views.
    OR
    Click the target table or view, and then on the Query Builder tool bar, click Add.
    OR
    Right-click the target table or view, and then click Add.
    For multiple tables or views: Use SHIFT+click for adjacent tables or views or use CTRL+click for non-adjacent tables and views.
Note: Moving a table or view to the SQL Diagram Pane is not available while a query is executing.

Deleting a Table or View

To delete tables from the SQL Diagram Pane, do the following:

  1. Right-click the target table or view, and then click Delete.
    OR
    In the SQL Diagram, click target table or view, and then on the Query Builder tool bar, click Delete.
    OR
    In the SQL Diagram, right-click the target table or view, and then click Delete.
    Query Builder deletes the table from the SQL Diagram, SQL Statement, and SQL Statement Tree.