Scenario:We often come to situation where we need to make same changes to multiple line of code. This is great feature to make quick change to tsql script.
Take a look into below script,I would like to change Testdb1 to testdb2 for first three queries. We might think that we can use Find and Replace, that can be used but we have to replace one item at a time as our each query is using Testdb1. By using SSMS Edit Vertical Blocks feature we can replace Testdb1 with testdb2 for three queries quickly.
Use master go Select * From testdb1.dbo.test1 union all Select * From testdb1.dbo.test2 union all Select * From testdb1.dbo.test3 union all Select * From testdb1.dbo.test4 union all Select * From testdb1.dbo.test5 union all Select * From testdb1.dbo.test