SQL CTE Formatting

When using the DataGrip SQL Formatter, it formats CTEs (Common Table Expressions) in a way that adds an extra space or indentation at the beginning of the second and subsequent CTEs. For example, it formats the CTE like this:

WITH advertiser_type AS (
  -- something...
),
    base AS (


I want all CTEs to be aligned without any extra space, like this:

WITH advertiser_type AS (
  -- something...
),
base AS (

How can I adjust the formatter settings in DataGrip to achieve the desired formatting?

1

Could you specify SQL dialect you're trying to format? 

0

same issue, this doesn't seem related to the dialect, but I'm using MySQL.

0

By default IDE formats it like:

 

 

Could you provide a sample DDL and the way you'd like it to be formatted? 

0

请先登录再写评论。