Skip to content

fix(transactsql): format OUTPUT as a clause - #1007

Closed
emirmrkaljevic wants to merge 1 commit into
sql-formatter-org:masterfrom
emirmrkaljevic:tsql-output-clause
Closed

emirmrkaljevic wants to merge 1 commit into
sql-formatter-org:masterfrom
emirmrkaljevic:tsql-output-clause

Conversation

@emirmrkaljevic

Copy link
Copy Markdown

Fixes #888

In Transact-SQL, OUTPUT was not a reserved clause, so in UPDATE ... SET ... OUTPUT ... it got glued onto the end of the SET expression.

This adds OUTPUT to the Transact-SQL reserved clauses, so it starts a new line like INTO and WHERE (works for UPDATE, DELETE, INSERT and MERGE).

pnpm test, pnpm run lint, pnpm run ts:check and prettier all pass.

@nene

nene commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

I'm adopting a new policy for this repository: no AI-generated contributions. I don't care how good they are.

This is to preserve my sanity.

@nene nene closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FORMATTING] Line break at OUTPUT for SQL server

2 participants