Poor Man's T-SQL Formatter
This is a free and open-source SQL (T-SQL) formatter:
- Handle complete multi-batch scripts, including object definition scripts such as stored procedures, triggers, and so on.
- Formatting options are provided to meet different common format styles/standards
- Optionally output "colored" HTML code, not just formatted SQL
- A "remover" option is also available to remove comments and spaces to confuse rather than print your code beautifully
- Ready-to-use models are available in a variety of formats
- SSMS (SQL Server Management Studio) and Visual Studio plug-ins/extensions that allow you to format the current file or selected text with a single hotkey - support for any version of SSMS or SSMS Express, as well as any full (non-Express) version of Visual Studio.
- Notepad++ plugin for quick one-click formatting in your favorite universal text editor.
- Command line utility that allows you to batch format as many files as you want, or format from any other program - for windows (.Net) or any environment (node/npm)
- Winforms app for easy offline formatting (also lets you view token streams and parse trees)
- The WinMerge plugin for automatically formatting SQL files before comparison allows WinMerge to display only content changes, ignoring formatting differences.
- Expose a JS library with the same functionality in any browser or other Javascript-based context for demo/formatting sites onlineThe hyperlink login is visible.
- Also available as a .Net 2.0/3.5 library, available here or for download via NuGet
- Written in C#, with a pluggable design, other SQL dialects should be supported in the future
Official Website:The hyperlink login is visible. GitHub address:The hyperlink login is visible. Online SQL Formatting:The hyperlink login is visible. Poor Man's T-SQL Formatter has Visual Studio, SSMS, Notepad++ and other plug-ins, which can be well inherited with other tools, taking the SSMS plug-in as an example, download address:The hyperlink login is visible.
PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16.msi
(692 KB, Number of downloads: 0, 售价: 3 粒MB)
I installed it nativelySQL Server Management Studio version: 15.0.18390.0, as shown in the figure below:
Before installing PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16,The PC needs to have the .NET Framework 2.0 runtime installed, otherwise the error will be as follows:
To install the installation steps, enable or turn off Windows functions from the control panel and check the installation checkbox, as shown in the figure below:
After installing PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16 again, the error Microsoft is as follows:
--------------------------- Microsoft SQL Server Management Studio --------------------------- The "FormatterPackage" package failed to load correctly. This issue can be caused by a configuration change or installing another extension. Details can be obtained by looking at the file "C:\Users\itsvse_pc\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml". Restarting Visual Studio can help resolve this issue. Keep showing this error message? --------------------------- Yes(Y) No(N) --------------------------- Solution: Open the installation directory, for example: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE folder, editSsms.exe.configThe following documents have been added:
Open the Microsoft SQL Server Management Studio 18 tool again, no longer report an error, and enter a SQL statement, as shown in the following figure:
Click Tools -> Format T-SQL Code, or the shortcut Ctrl+K, F(Before clicking F, you need to release Ctrl), the formatted renderings are as follows:
(End)
|