I was looking for a way to pin query result in 'Microsoft SQL Server Management Studio' similar to how we can do in Oracle SQL Developer. I googled about it but it didn't help. Anyone knows how this can be achieved.
Update: I have now been using SSMS for 6.5 years. I recently upgraded to Visual Studio SSMS at the end of 2025 and I once again found myself googling how to Pin Query Results and a StackOverflow post came up... turns out the post that came up was mine from 4 years ago! This feature is STILL not available. I've been missing the Oracle IDE for 6.5 years now. It had all that was needed. Using SSMS I've even forced to pay for a RedGate license just to get features I had when using Oracle IDE out of the box.
Not for query results, but if you are trying to compare result sets in SQL visually, you are doing it the wrong anyway; visual comparisons are far too prone to error. You should be using the EXCEPT keyword to compare results. Load your data from query 1 into a temp table or table variable and do the same for the second query. Below is an example; feel free to populate the tables and see the results for yourself.
DECLARE @Table1 TABLE (val int)
DECLARE @Table2 TABLE (val int)
select * FROM @Table1
EXCEPT
select * FROM @Table2
select * FROM @Table2
EXCEPT
select * FROM @Table1
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With