Feature request: extra format option for join tables

intGodintGod Posts: 7 New member
edited July 26, 2024 11:22AM in SQL Prompt
Currently, I can get SQL Prompt to format my SQL like this.

SELECT
    tbl.name AS TableName,
    col.name AS ColumnName
FROM
    sys.tables AS tbl
    INNER JOIN
        sys.columns AS col
    ON
        tbl.object_id = col.object_id
This annoys me because the tables in the FROM statement are not aligned. I would like to be able to achieve something like below where the tables are aligned and the join and ON are indented from the table. So the tables are indented from the FROM and the INNER JOIN is indented from the table. Then, the ON can either be indented from table or aligned to JOIN.
SELECT
    tbl.name AS TableName,
    col.name AS ColumnName
FROM
    sys.tables AS tbl
        INNER JOIN
    sys.columns AS col
        ON
            tbl.object_id = col.object_id
        AND @SecondJoinCondition = 1

Tagged:

Answers

Sign In or Register to comment.