Hi,
Can Anyone help me How to format T-SQL Statements in the SSMS
Thanks,
Eshwar,Nakkala
Hi,
Can Anyone help me How to format T-SQL Statements in the SSMS
Thanks,
Eshwar,Nakkala
Could you please validate all the answers so far and provide any update?
If all of them are not working or helpful, please provide more sample data or details about your issue.
Please remember to accept the answers if they helped. Your action would be helpful to other users who encounter the same issue and read this thread.
Thank you for understanding!
You can install plugins to beautify the code. See several options discussed here - https://stackoverflow.com/questions/3310188/what-free-sql-formatting-tools-exist
I mostly use poorsql.com website to format the code and don't use any plugin as such.
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav
You can format SQL code using SQL Server Management Studio (SSMS) native options or format SQL code using a third-party SQL formatter tool.Please refer to this link:How to format SQL code in SQL Server Management Studio
You can also use a SSMS plugin called Poor Man’s T-SQL Formatter for formatting SQL statements and procedures.
Installing And Using Poor Man’s T-SQL Formatter
1.Download the Poor Man’s T-SQL Formatter plugin from http://architectshack.com/PoorMansTSqlFormatter.ashx.
2.Double click the downloaded msi file and install it.
3.Now, launch the SSMS. Either select a statement to format only a specific statement in the document, or do not select anything, if you want to format the content of whole document.
4.Go to Tools on menu and select Format T-SQL Code. The T-SQL code will be formatted.
For more details, please refer to:
Formatting SQL Statements In 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.
13 people are following this question.