SQL Server Management Studio (SSMS) has a lot of cool little tips and tricks. Last night, while presenting for 24 Hours of PASS, I used the Window Split function and noticed a few “oohs” and “aaahs” on Twitter.
Here’s how you do it.
Open a query in SSMS. In this case, I was looking at a nonclustered index creation statement, and wanted to keep it at the top of the window while I ran several queries, seeing if they would use it.
To split the upper half of the window, where my query is, I can either go to Window > Split, or click the little (and I mean teeny-tiny) double-headed arrow in the top right.
This tip can be helpful for many situations. Think of viewing a stored procedure or function, and keeping the list of parameters at the top of the window. It can be really helpful when combined with the Tools > Options> Query Results > SQL Server > Results to Grid > “Display results in a separate tab” option, for keeping large portions of the query on the screen at one time.