问题:
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