Edit join paths in Visual SQL
A join path is the visual representation of a JOIN clause in a visual mode query. A JOIN clause brings together the rows from two or more tables into a single set of data by connecting the tables using foreign key relationships defined in the schema. Using the correct join path is essential for ensuring you’re querying the correct data.
To edit the join path in visual mode:
Select Join path. A pop-up will appear.
Select a column name or line of an alternative join. The line will become blue to indicate it’s currently selected.
Select Run query to run your query with the updated join path.
Read more about editing join paths in visual mode queries.
Example
The Work item table contains three foreign keys that connect to the “Account” table:
Assignee account ID
Creator account ID
Reporter account ID
If you wanted to get the name of the assignee for each work item in a single query, you’d need to make sure that the join path uses the Assignee account ID column to connect the Work item table to the Account table. Otherwise, you may end up getting names of creators or reporters instead.
Was this helpful?