I’m sure this one’s been in SQL Server Management Studio for quite a while, but I never noticed it before now.
Let’s say you’re running a batch in SSMS containing 2 T-SQL Statements. For simplicity’s sake, I’ll do some selects from my Numbers table:
SELECT TOP 10 * FROM Numbers; SELECT TOP 100 * FROM Numbers;
The “Results” tab appears with 2 result sets. The first has 10 rows, and the second has 100. The rows counter at the bottom right says “110 rows”. All of is exactly what I’ve come to expect. (Click on any screenshot to enlarge)
But wait, there’s more! If you click in the top result set, that counter will change to say only 10 rows. Click on the bottom set and it now says 100. Click back in the query window and it again shows the combined total of 110.
Nifty, eh? Again, I’m sure this is nothing new, just I had never noticed this behavior in SSMS before. Happy querying!