問題:
In Visual Studio & other IDEs, you can easily auto format your code with a keyboard shortcut, through the menu, or automatically as you type.在 Visual Studio 和其他 IDE 中,您可以使用鍵盤快捷鍵、通過菜單或在鍵入時自動設置代碼格式。
I was wondering if there is yet a way to enable this standard feature in SQL Server Management Studio?我想知道是否還有一種方法可以在 SQL Server Management Studio 中啓用此標準功能?
I'm working with some large-ish stored procs that are a mangled mess of poorly formatted SQL and it'd be nice if I could just go "Select All -> Format SQL"我正在使用一些大型的存儲過程,這些過程是格式錯誤的 SQL 的混亂,如果我可以去“全選 - > 格式化 SQL”就好了
解決方案:
參考一: https://stackoom.com/question/1gYi參考二: Format SQL in SQL Server Management Studio