How stick the SQL windows at the top in SSMS


Microsoft SQL server 2019


How find what SQL Query is it that i is working one?


When you have a long list of Query’s you work with, click on the little PIN one each and they will stay at the top. And maybe it is easier for you to find back to the one you want to work with.


Other tip is to use WHERE 1=1 in your statements, to easy then remark the lines you need or not need when you adjust your selection.

SELECT TOP (1000) [GeographyKey]
FROM [AdventureRestore].[dbo].[DimGeography]
and CountryRegionCode = 'AU'
--and city = 'Alexandria'
and PostalCode = 2015


More Information: