Recently I was doing a demo for a client that involved executing some T-SQL in Management Studio. As I seamlessly talked and executed code, the client took notice of how I was executing the code on my laptop. He asked, “I see you don’t use F5 to execute, so how are you executing your code?”. I replied, “Alt-X”. He was completely shocked, “That is really awesome and way better than using F5!”.
My reasoning for using Alt-X is twofold. On the one side, I learned T-SQL using SQL Server 2000 and the hot-key option I used to execute code (as dictated by my Senior DBA at the time) was Alt-X. Secondly, and more importantly, I don’t like having to always lift my left wrist to hit F5 to execute code. Alt-X is perfectly situated so I do not even have to move my left arm. Coding in this style has become quite fluid and natural as I have coded throughout the years.
This got me thinking – is Alt-X displayed in the Query menu of SSMS? Strangely, it is not:
I’ll leave the exercise of figuring out why Alt-X is left out to you.
Which handy short-cut method do you use (if any)?