>>>In my case all tables, MyTable, MyTable1, MyTable2, and MyTable3 exist in both databases. It is just that some customers, instead of using the table in their "own" database, use it in another database. This is why I want to explicitly have the db name prefix for all tables that are not in the default database.
>>
>>The more it makes sense to mention the OtherDb.dbo. prefix only once and use aliases down the road. Then if you need to change something, you change it in only one place (i.e. if you want to remove the prefix) and the command remains just as (un)readable as before.
>
>This alias is a property of the application object. So, no matter how many places I use it, I only need to change it once in this property (on the start of the application).
No, no, I meant the *local* aliases inside the sql statement - once you say TheOtherDb.dbo.myTable2 as t2, t2 is your local alias for the rest of that statement. And no matter how you change the from table but keep its alias, the rest of the statement can remain unchanged.
The alias of the resulting cursor is, then, outside of scope for this discussion, it applies when this SQL command returns results.