SSMS 20.2 re-style t-sql code after save it

Farshad Valizade 501 Reputation points
2024-08-16T05:31:14.2066667+00:00

hi ever body. recently I see that SSMS change code style and format after save it.

u can see :

1

and I press F5 it save the query(SP) and when I open it it change to it:

2

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LiHongMSFT-4306 31,081 Reputation points
    2024-08-16T06:28:45.59+00:00

    Hi @Farshad Valizade

    As far as I know, SSMS itself doesn't have built-in automatic code formatting that changes your code style upon saving.

    Please check if exist any third-party tools or extensions for code formatting, they might be applying formatting rules automatically.

    Best regards,

    Cosmog


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.