Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to auto-indent a query in Sql Server Management Studio Express? [closed]

I mean, something equivalent to Ctrl + K + D from Visual Studio that automatically indents code. Is there something in this sense?

like image 878
André Pena Avatar asked Jan 19 '10 00:01

André Pena


People also ask

How do I indent query in SQL Server Management Studio?

Select the text you want to indent. Press TAB, or click the Indent button on the Standard toolbar.

How do I auto format a SQL query in SQL Server?

Format SQL Code in SSMS Query Window To use the SSMS add-in component we will have to close and then open SSMS after the install of the add-in. Then open a SSMS query window, highlight the code that needs to be formatted. Then select Format T-SQL Code from the SSMS Tools menu. Here is the code after the formatting.

How do I enable autocomplete in SSMS?

How to Enable IntelliSense Feature in SSMS. Open SSMS, click Tools -> Options -> Expand Text Editor -> Expand Transact-SQL and click on IntelliSense as shown in the snippet below. Under Transact-SQL IntelliSense Settings ensure “Enable IntelliSense” checkbox is enabled.


1 Answers

Just discovered this - yet another variation on this older question which has much more activity: SQL Formatter for SQL Management Studio

I personally am a big fan of the Poor Man's T-SQL Formatter / http://poorsql.com - but then I wrote it :)

like image 178
Tao Avatar answered Sep 19 '22 11:09

Tao