15

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?

1
  • 2
    Did you mean SQL Server Management Studio? Commented Dec 20, 2011 at 21:03

3 Answers 3

20

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.

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

-1

Try CTRL+Y it will work. first select all the code to which you want to do formatting then press CTRL+Y.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.