sql-serverssms

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?


Solution

  • 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.