Skip to content

[FORMATTING] MySQL "NOT IN ()" removes space before ( #933

@verhovsky

Description

@verhovsky

Input data

SELECT
  a
FROM
  b
WHERE
  x NOT IN(
    SELECT
      y
    FROM
      z
)

Expected Output

SELECT
  a
FROM
  b
WHERE
  x NOT IN (
    SELECT
      y
    FROM
      z
  )

Actual Output

(as is)

SELECT
  a
FROM
  b
WHERE
  x NOT IN(
    SELECT
      y
    FROM
      z
  )

Usage

  • How are you calling / using the library? https://sql-formatter-org.github.io/sql-formatter/
  • What SQL language(s) does this apply to? MySQL, the other language formatters format it as expected
  • Which SQL Formatter version are you using? (The exact version number.) Website doesn't say

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions