Hi @Shreklili ,
Welcome to the microsoft TSQL Q&A forum!
Please refer to a similar question I answered a few days ago:
How to format T-SQL Statements in the SSMS
If you have any question, please feel free to let me know.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.