Aliases for synonyms
When using a synonym, the alias name generated is based on the synonym orginal table, not in the synonym name.
So, if I have a synonym named sch1.ShortTableName that maps on AnotherDatabase.sch2.TableWithLongAndComplexName
If I write
SELECT * FROM sch1.ShortTableName
It ends being
SELECT * FROM sch1.ShortTableName AS twlacn
It would be good that in case of synonyms, the alias name was based on the synonym name, not on the source object name.
Or to keep backwards compatibilty, to have a setting that lets us choos either to follow the synonym name or the source object name.
1
vote
Dani Sardà i Lizaran
shared this idea