• Documentation

Edit the join path of your visual mode query

In SQL, a JOIN clause brings together the rows from two or more tables into a single query result set. A JOIN clause could have one or more joins, which are direct connections between two tables using foreign key relationships defined in the schema. Learn more about foreign keys.

JOIN clauses and the types of joins that you use can affect the data that are returned from your queries. Learn more about join types.

When using visual mode, you can see the query’s join path, which is a visual representation of its JOIN clause.

The example below shows a join path to connect the “Issue” and “Project fix version” tables. This join path involves two joins:

  • a join between the “Issue” table and the “Issue affected version mapping” table using the “Issue ID” columns

  • a join between the “Issue affected version mapping” table and the “Project fix version” table using the “Version ID” columns

Join path that uses the "Issue affected version mapping" table to connect the “Issue” and “Project fix version” tables

Edit join path

It’s possible to have more than one way to join tables together. If your visual mode query has more than one join to choose from, you’ll see a “More options” label appear in the join path panel that indicates you can select different joins to use.

To select a different join in the join path:

  1. Select Join path. A pop-up will appear.

  2. Select a column name or line of an alternative join. The line will become blue to indicate it’s currently selected.

  3. Select Run query to run your query with the updated join path.

Highlights "Join path" panel in visual mode query

Join path diagram

When you edit a join path, the pop-up will contain an interactive diagram that shows the following information:

Annotated guide for key elements in the join path diagram
  1. Selected join - A currently selected join between two tables in the join path

  2. Alternative join - Another join option to connect two tables together in the join path

  3. Intermediate table - A helper table used to connect two tables that don’t have direct connections between them

Complex join paths

There are two reasons why you may not be able to edit a join path in visual mode:

  • the join path involves more than two joins

  • there are too many alternative joins to choose from

In these cases, you’ll need to switch to SQL mode and edit the JOIN clauses directly in the SQL query.

Changes you make in SQL mode don’t reflect in visual mode.

Still need help?

The Atlassian Community is here for you.