Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I recently started using Management Studio 2012. When using MySQL Workbench, a handy feature was that I could stay all in lower case and any reserved word (like SELECT, INSERT) would convert to upper case automatically. How do I replicate this behavior in SSMS?

share|improve this question
Does anyone else find this really unworkable? Having to hit CAPS for reserved words then again to type variable names etc? It really slows down my typing. –  David Folksman Aug 22 '13 at 13:52
you'll get used to it. :-) I've been doing it for so long, actually NOT hitting Shift for keywords would slow me down. –  Aaron Bertrand Aug 22 '13 at 13:53
:) haha, ok I'll try to retrain my brain for use with T-SQL (held shift to type T, then I let go to type the hyphen, then I pressed it again to finish, then I jumped out the window). –  David Folksman Aug 22 '13 at 14:02
Of course there is always the option of not making the keywords upper case. Not as easy to read, but you don't have to hit the shift key. :) –  Kenneth Fisher Aug 22 '13 at 14:39
@DavidFolksman Have you tried using GROUP BY with a SELECT *? –  Kermit Aug 22 '13 at 14:48

2 Answers 2

up vote 5 down vote accepted

No, Management Studio does not have this native functionality in any version from 2005 -> 2014 CTP1. You may want to check out 3rd party add-ins, like Mladen Prajdić's SSMS Tools Pack or Red-Gate's SQL Prompt, both of which have the capability to format a block of code, including automatically upper-casing keywords. However I don't know of any tool that will do this automatically as you type.

For me, I have been doing it so long, it just comes naturally, and not pressing Shift would actually slow me down. When I get someone else's code where the keywords are lower case, I highlight either the whole block or the offending sections, and hit Ctrl+Shift+U. If I have to highlight the whole section, I then go in to the object / column names and use IntelliSense to case them correctly (I have a real hang-up about ensuring that all keywords are upper case and all entity names match the metadata exactly, because you never know when your code will be deployed to a case sensitive collation.

share|improve this answer
Thanks for the insight :) –  David Folksman Aug 22 '13 at 15:07

SQL Pretty Printer does it pretty well for me. It's a small and easy-to-install plugin for SSMS. You set up your preferences and then whenever you want to format code, just click the icon on its toolbar.

share|improve this answer
gonna test this out right now, thanks! –  Ali Razeghi Aug 22 '13 at 20:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.