14

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?

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
user979189
  • 1,230
  • 2
  • 15
  • 39

2 Answers2

19

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.

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
1

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

Nilay Vishwakarma
  • 3,105
  • 1
  • 27
  • 48