SSMS Query Shortcut
Dear BI Developer,
I’m pretty sure you would be happy to improve your productivity. If not, you should at least read this article to look like a superman (superwoman) developer.
When I start a new mission, the first thing I do is to set up SSMS (SQL Server Management Studio). And because I’m the kind of guy who acts like a Microsoft BI evangelist (and also for running), I replicate my configuration on my colleague’s machines.
In this example – CTRL + 4 – COUNT
Select statement you want to execute, Press CTRL and 4
SSMS will give you Nb impacted rows.
In BI (and not only!), it’s very important to test if we have unexpected behavior with our joins.
Does our INNER JOIN filter too much data? Or worst, does our join multiply our result set?
A quick and easy CTRL + 4 will ensure you to respect your grain.
How to configure Management Studio
Open Management Studio, Go to Tools > Option…
Under Environment > Keyboard > Query Shortcuts
You have a list of existing shortcuts. (I don’t change them, but I neither use them too).
You should now fill each text box with a query.
(See image and table below)
Queries are available on the next section
Do not forget to add a space after each query.
CTRL + 3
1000 First Rows
SELECT TOP 1000 * FROM
CTRL + 4
SELECT COUNT(1) AS Nb FROM
CTRL + 5
SELECT * FROM
CTRL + 6
Select a table and show a quick description of attributes (Name, Datatype, size, nullable, identity)
CTRL + 0
All Running queries
a better SP_Who! List all running queries (Process ID, Status (blocked or running), users, …)