简体   繁体   中英

Format SQL statements in SQL Server Management Studio 2008

I am trying to use Ctrl K + Ctrl D (format document) in SQL Server Management Studio. It gives the message

The key combination (key, key) is bound to command(command) which is not currently available.

I also tried Ctrl A + Ctrl K + Ctrl F , and that didn't work either.

Is there any update or fix that I need to install for that?

There is nothing to fix - SQL Server Management Studio is not Visual Studio and does not contain a SQL pretty printer.

In other words, SSMS does not have a document formatting option out of the box.

See the answers to SQL Formatter for SQL Management Studio for options.

I was struggling with this, Finally found this Ctrl + K , Ctrl + Y and it worked for me. But you need to have SQL Prompt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM