because SSMS supports the go command, you can use different batches to query different database without having to include the database name in the query (no help for linked servers).
use database1
go
select * from table1
go
use database2
go
select * from table2
go